Baseflow / Baseflow/flutter_cache_manager

issue with the stalePeriod config

Abierto
#485 2 comentarios 4 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Dart
Estrellas
809
Forks
510
Merge medio
6 min
PR fusionados (30 d)
1

Descripción

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

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Comienza reproduciendo el comportamiento con la clase CustomCacheManager mostrada y su valor Config.stalePeriod junto con cached_network_image. Rastrea cómo se proporciona el gestor de caché a la carga de imágenes y verifica si una imagen sigue siendo utilizable después de la duración configurada. Se considera terminado cuando se haya identificado la causa y se haya hecho efectivo stalePeriod, o cuando se haya documentado una limitación confirmada y la configuración necesaria.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
dart, flutter
Área
mobile-dev
Tipo de issue
Error
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Estancado
Claridad
Necesita aclaración
Aptitud para principiantes
25/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.