Skip to content

Stale period not working properly #452

Open
@RezaMahdinezhad

Description

@RezaMahdinezhad

` Im using flutter_cache_manager: ^3.3.1 and the stale period its not working properly. its not automatically deleting the files.

final cacheManager = CacheManager(
  Config(
    id,
    stalePeriod: Duration(seconds: 60),
    maxNrOfCacheObjects: 10,
  ),
);

try {
  final fileStream = cacheManager.getFileStream(_syncMusicUrl);

  await for (var response in fileStream) {
    if (response is FileInfo) {
      _cacheMusicPath = response.file.path;

      return true;
    } else if (response is DownloadProgress) {}
  }
  return false;
} catch (error) {
  syncSituation.value = "sync";
  update();
  return false;
} }`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions