flutter_cache_manager icon indicating copy to clipboard operation
flutter_cache_manager copied to clipboard

DefaultCacheManager emptyCache() do not work

Open mmshahshahani opened this issue 3 years ago • 1 comments

🐛 Bug Report

Hi I'm using DefaultCacheManager to read a file from an URL like bellow :

DefaultCacheManager().emptyCache();

      file = await DefaultCacheManager()
          .getSingleFile(url)
          .onError((error, stackTrace) {
        isRead = false;
        return fil;
      });

and next time I change file content but first content is returned and emptyCache() do not work .

I tried like below too :

DefaultCacheManager dfcm = new DefaultCacheManager();

dfcm.emptyCache();

      file = await dfcm
          .getSingleFile(url)
          .onError((error, stackTrace) {
        isRead = false;
        return fil;
      });

Expected behavior

Reproduction steps

Configuration

Version: flutter_cache_manager: ^3.3.0

Platform:

  • [x] :robot: Android

mmshahshahani avatar Oct 24 '22 09:10 mmshahshahani