shouldUseCache method
Implementation
Future<bool> shouldUseCache(
LocalRepository repository,
CacheDescription? cache,
) async {
if (cache == null || cache.key.isEmpty) return false;
ApiConfig().log('cache ${cache.key} lifeSpan=${cache.lifeSpan}');
if (cache.invalidateCache) return false;
if (cache.overrideTime) return true;
return await repository.checkCache(cache.key);
}