Baseflow / Baseflow/flutter_cache_manager

issue with the stalePeriod config

未关闭
#485 2 条评论 4 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Dart
星标
809
派生
510
平均合并
6 分钟
30 天内合并 PR
1

描述

I’ve encountered an issue with the stalePeriod setting in our CustomCacheManager when using it with cached_network_image. I tried setting different values, such as 1 minute, 1 day, and 15 days, but it doesn’t seem to take effect.

Here’s the current implementation:

```

class CustomCacheManager {
static const key = 'customCacheKey';
static CacheManager instance = CacheManager(
Config(
key,
stalePeriod: const Duration(days: 15),
),
);
}

```

I expected the cache to expire based on the stalePeriod value, but the images are still being loaded from cache beyond the set duration. Are there any limitations or additional configurations required for cached_network_image to respect this setting?

Would appreciate any insights. Thanks!

cached_network_image: ^3.4.1
flutter_cache_manager: ^3.4.1
flutter: 3.29.2

贡献指南

打开贡献指南

调研方向

首先,使用所示的 CustomCacheManager 类及其 Config.stalePeriod 值,结合 cached_network_image 重现该行为。跟踪缓存管理器如何传递给图像加载过程,并验证图像在配置的时长过后是否仍可使用。完成的标准是确定原因并使 stalePeriod 生效,或记录已确认的限制以及所需的配置。

由索引模型根据 Issue 内容生成。

评估

技术栈
dart, flutter
领域
mobile-dev
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
需要澄清
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。