I have cached my files using Flutter_Cache_Manager. I have cached the files with specified stale duration. Remember that I am using Custom Cache Manager, for DefaultCacheManager doesn't come with custom stale duration. Everything is working fine, but the file is getting removed/deleted from the cache.
I specified my stale duration to 3 minutes, to test if it gets removed from the cache after the stale duration is over, but the file remains in cache even after the stale duration is over. It's been 30+ hours and the file is still cached. I haven't cached anything other than this particular file.
Package Version flutter_cache_manager: ^3.3.1 Visit This Package
Caching File
var file = await CacheManager(Config("images", stalePeriod: const Duration(minutes: 3))).getSingleFile(imageUrl);
Testing File Existence
var fil1e1 = await CacheManager(Config("images", stalePeriod: const Duration(minutes: 3),),).getFileFromCache(imageUrl);
print("Does it exist in cache : ${fil1e1.file.existsSync()}");
Why does this happen, is it normal, if yes, then when does it remove the file from the cache? And how does it work?