Baseflow / Baseflow/flutter_cache_manager

DefaultCacheManager emptyCache() do not work

Open
#391 1 comment 3 reactions 0 assignees View on GitHub
Dominant language
Dart
Stars
809
Forks
510
Avg merge
6m
Merged PRs (30d)
1

Description

## 🐛 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

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the Android behavior with DefaultCacheManager.emptyCache() followed by getSingleFile(url), using flutter_cache_manager 3.3.0. Check how the two calls are sequenced and identify the relevant cache-manager entry point. Done means the reproduction returns the updated file content after the cache is emptied, with a regression test covering the behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart, flutter
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.