Baseflow / Baseflow/flutter_cached_network_image
How does stalePeriod work?
- Dominant language
- Dart
- Stars
- 2.6k
- Forks
- 731
- Avg merge
- 3d 9h
- Merged PRs (30d)
- 1
Description
I passed a `cacheManager` to the `CachedNetworkImage` widget we are using.
To test whether the image is deleted from the cache or not, I set the `stalePeriod` to 5 seconds. Like this:
```dart
CachedNetworkImage(
imageUrl: "myimagelink"
cacheManager: CustomCacheManager.instance,
),
// ...
class CustomCacheManager {
static const key = DefaultCacheManager.key;
static CacheManager instance = CacheManager(
Config(
key,
stalePeriod: const Duration(seconds: 5),
),
);
}
```
However, the cache manager is not working as expected. If an image is cached and then not used for 5 seconds, shouldn't it be automatically deleted from the cache? We believe it should work this way. Or do we need to delete it manually?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.