Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The cached files aren't being removed after the stale duration is over! #446

Open
2 tasks
TheUnknownCorp opened this issue Feb 26, 2024 · 1 comment
Open
2 tasks

Comments

@TheUnknownCorp
Copy link

TheUnknownCorp commented Feb 26, 2024

🐛 The cached files aren't being removed after the stale duration is over!

With Custom Cache Manager, the stale duration isn't working! It's not removing the file after the stale duration is over. I had set the stale duration to 3 minutes, but the file was deleted even after more than 30 hours.

Expected behavior

The cached files are supposed to be deleted after the stale duration of the file is over. But, the file continues to remain in the cache ruining the whole structure.

Reproduction steps

Just cache a file with Custom Cache Manager, for DefaultCacheManager doesn't come with a stale duration option, and assign Stale Duration to anything, i assigned it 3 minutes to test it more efficiently. Then, I just invoked my function to see if the file is cached without displaying it, which I was doing with Cached_network_Image. I used the getFileFromCache function to get the file specifically and only from the cache, and it printed that the cached file exists, even after the day since is caching. Btw, remember I cached it for 3 minutes.

Configuration

Version: flutter_cache_manager: ^3.3.1

Platform:

  • 📱 iOS
  • 🤖 Android
@kdubba
Copy link

kdubba commented Mar 18, 2024

Any updates here? I see the same problem when I use this with CachedNetworkImage. I suspect, the cache manager is not being used, so CachedNetworkImage never refreshes the existing cache.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants