flutter_cache_manager icon indicating copy to clipboard operation
flutter_cache_manager copied to clipboard

Is there a method to check whether a file exists in the cache using its url?

Open Maarten0110 opened this issue 1 year ago • 1 comments

💬 Questions and Help

Hi,

I've looked through the documentation, the issues on GitHub and source code. I'd like to know, using its URL, if a file exists in the cache.

I've only found a private method in the cache manager's CacheStore: _fileExists(). But since it's private, I cannot use it.

Any other suggestions?

Maarten0110 avatar Oct 03 '24 12:10 Maarten0110

You can use cacheKey then get file info from cache by key: final fileInfo = await DefaultCacheManager().getFileFromCache(cacheKey);

farrerdev avatar Nov 21 '24 07:11 farrerdev