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