flutter_cache_manager
Generic cache manager for flutter. Saves web files on the storages of the device and saves the cache info using sqflite.
3.4.2
3.5M downloads/mo
#179 most downloaded on pub.dev
Baseflow/flutter_cache_manager
What this package is like to depend on
Last release 1 months ago
21 Jul 2026
Ships unpredictably
gaps range from 8 days to 1.9 years
Nearly every release is documented
notes for 42 of 44 stable releases
Nothing withdrawn
no release was ever pulled
9 years old
59 releases · first in 2017
1 release in the last 12 months
see the full history below
Release timeline
59 releases · Dec 2017 to Jul 2026Releases
latest 59-
3.4.221 Jul 2026Nothing published for this version
-
3.4.113 Aug 2024 -
3.4.031 Jul 2024Release notes
Open source →What's Changed
- move to flutter_lint by @renefloor in #351
- support m4a file extension by @VICrazy in #358
- fix example app baseflow git url by @Ritsz123 in #368
- Update android example's
compileSdkVersionby @sidrao2006 in #374 - Upgrade to Dart 3 to compatibility with http ^1.0.0 by @Carapacik in #414
- Updates all dependencies to their latest versions. by @mvanbeusekom in #453
- Support latest rxdart version and align Dart SDK version by @Carapacik in #457
- Export cache_object by @tristan-vrt in #371
- Add config getter to CacheManager by @HugoHeneault in #378
- expose memoryCacheContainsKey method from cache_store by @vinicius0026 in #354
- Add
platformdeclaration to pubspec.yaml by @sidrao2006 in #375 - Bugfix/delete not cached file by @mateussiqueira in #387
- chore: Update dependencies for Firebase Cache Manager by @percula in #415
- Fixed: PathNotFoundException when deleting a file that is already del… by @MattyBoy4444 in #423
- Export File System by @wyyadd in #431
- Get cache total size by @liasica in #449
- change order to allow to override ifNoneMatchHeader by @binSaed in #463
- Support custom Firebase storage bucket by @minhdanh in #455
New Contributors
- @VICrazy made their first contribution in #358
- @Ritsz123 made their first contribution in #368
- @Carapacik made their first contribution in #414
- @mvanbeusekom made their first contribution in #453
- @tristan-vrt made their first contribution in #371
- @HugoHeneault made their first contribution in #378
- @vinicius0026 made their first contribution in #354
- @mateussiqueira made their first contribution in #387
- @MattyBoy4444 made their first contribution in #423
- @wyyadd made their first contribution in #431
- @liasica made their first contribution in #449
- @binSaed made their first contribution in #463
- @minhdanh made their first contribution in #455
Full Changelog: v3.3.0...v3.4.0
Release notes
Open source →- [Bugfix] For a previously cached file that got removed on the server, now evicts that file on 404 and notifies listeners.
- Allow to override ifNoneMatchHeader
- Get cache total size
- Export File System
- Expose memoryCacheContainsKey method from cache_store
- Updates dependencies
-
3.3.323 Jul 2024 -
3.3.225 Apr 2024 -
3.3.103 Jul 2023Release notes
Open source →- Support Dart 3.0.0 for http ^1.0.0 and file ^7.0.0
- Update example
- Add topics
-
3.3.029 Nov 2021Release notes
Open source →- Added option to manage the log level. Doesn't print failed downloads by default anymore. You can set it like this:
CacheManager.logLevel = CacheManagerLogLevel.verbose; -
3.2.027 Nov 2021Release notes
Open source →- [Bugfix] getSingleFile now downloads a new file before completing as the outdated file might have been deleted.
-
3.1.305 Nov 2021 -
3.1.217 Jun 2021 -
3.1.103 Jun 2021Release notes
Open source →- Move File to separate file. You can add it using the following import:
import 'package:flutter_cache_manager/file.dart' as cache_file; -
3.1.028 May 2021 -
3.0.210 May 2021 -
3.0.129 Mar 2021 -
3.0.027 Mar 2021Release notes
Open source →- Bug fix on removing a relatively new file from cache
- Migration to nullsafety.
-
3.0.0-nullsafety.326 Mar 2021 pre-release -
3.0.0-nullsafety.222 Mar 2021 pre-release -
3.0.0-nullsafety.102 Mar 2021 pre-release -
3.0.0-nullsafety.025 Feb 2021 pre-release -
2.1.209 Mar 2021Release notes
Open source →- Update dependencies
- Bug fix for JsonCacheInfoRepository when file is corrupted.
-
2.1.114 Jan 2021Release notes
Open source →- Update minimal dependency sqflite
- Small fix for non-existing directory (PR #264)
-
2.1.021 Dec 2020Release notes
Open source →- Added ImageCacheManager with support for image resizing.
- Upgrade dependencies.
-
2.0.016 Oct 2020Release notes
Open source →- Restructured the configuration of the CacheManager. Look at the ReadMe for more information.
- Added queueing mechanism for downloading new files. By default, the cache manager downloads a maximum of 10 files at the same time.
- Moved SQFlite database file from sqflite database path to application support directory.
- Add putFileStream to add an external file to the cache.
- Add option to use a key to get files from the cache which can be different from the url.
- Added JsonCacheInfoRepository for Windows and Linux.
- BREAKING CHANGE Creating a CacheManager now requires a Config object, see the readme for complete example.
- BREAKING CHANGE Renamed
maxAgeCacheObjecttostalePeriod - BREAKING CHANGE Custom CacheInfoRepository need to include a key and some extra methods.
- BREAKING CHANGE A CacheInfoRepository is now assumed to allow multiple connections, which means you can call 'open' multiple times and the repo keeps track on the number of connections.
-
2.0.0-beta.110 Oct 2020 pre-releaseRelease notes
Open source →- Reintroduced BaseCacheManager interface for backwards compatibility.
- Renamed putExistFile to putFileStream. This is equally efficient, but more clear in what it does.
-
2.0.0-beta01 Oct 2020 pre-releaseRelease notes
Open source →- Added option for a key different from the url.
- Added a new CacheInfoRepository: JsonCacheInfoRepository, which is not used by default on the existing platforms, but can be used on any.
- Added support for Windows and Linux using the JsonCacheInfoRepository by default.
- Added support for adding an existing file.
- BREAKING CHANGE Creating a CacheManager now requires a Config object, see the readme for complete example.
- BREAKING CHANGE Renamed
maxAgeCacheObjecttostalePeriod - BREAKING CHANGE Custom CacheInfoRepository need to include a key and some extra methods.
- BREAKING CHANGE A CacheInfoRepository is now assumed to allow multiple connections, which means you can call 'open' multiple times and the repo keeps track on the number of connections.
-
1.4.210 Sep 2020 -
1.4.114 Jun 2020Release notes
Open source →- Bugfix: CacheManager returned a file that didn't exist when the file was removed by the OS (or any other external system) while the app was active. This also prevented the CacheManager to redownload the file (PR #190).
-
1.4.004 Jun 2020 -
1.3.028 May 2020Release notes
Open source →- Basic web support. (At least it downloads the file for you.)
- Support for the following mimetypes:
- application/vnd.android.package-archive (apk)
- audio/x-aac (aac)
- video/quicktime (mov)
-
1.2.216 Apr 2020 -
1.2.114 Apr 2020 -
1.2.010 Apr 2020Release notes
Open source →- Added getFileStream to CacheManager
- getFileStream has an optional parameter 'withProgress' to receive progress.
- getFileStream returns a FileResponse which is either a FileInfo or a DownloadProgress.
- Changes to FileFetcher and FileFetcherResponse:
- FileFetcher is now replaced with a FileService which is a class instead of a function.
- FileServiceResponse doesn't just give magic headers, but concrete implementation of the needed information.
- FileServiceResponse gives a contentStream instead of content for more efficient handling of the data.
- FileServiceResponse contains contentLength with information about the total size of the content.
- Changes in CacheStore for testability:
- CleanupRunMinInterval can now be set.
- Expects a mockable directory instead of a path.
- Added CacheInfoRepository interface to possibly replace the current CacheObjectProvider based on sqflite.
- Changes in WebHelper
- Files are now always saved with a new name. Files are first saved to storage before old file is removed.
- General code quality improvements
- Added getFileStream to CacheManager
-
1.1.317 Oct 2019Release notes
Open source →- Use try-catch in WebHelper so VM understands that errors are not uncaught.
-
1.1.216 Oct 2019Release notes
Open source →- Better error handling (really better this time).
- Fix that oldest files are removed, and not the newest.
- Fix error when cache data exists, but file is already removed.
- await on putFile
-
1.1.123 Jul 2019Release notes
Open source →- Changed error handling back to throwing the error as it is supposed to be.
-
1.1.013 Jul 2019 -
1.0.027 Jun 2019 -
0.3.206 Mar 2019 -
0.3.127 Feb 2019 -
0.3.018 Feb 2019Release notes
Open source →- Complete refactor of library
- Use of SQFlite instead of shared preferences for cache info
- Added the option to use a custom file fetcher (for example for firebase)
- Support for AndroidX
-
0.3.0-beta.311 Feb 2019 pre-releaseNothing published for this version
-
0.3.0-beta.206 Feb 2019 pre-releaseNothing published for this version
-
0.3.0-beta.2+106 Feb 2019 pre-releaseNothing published for this version
-
0.3.0-beta.130 Jan 2019 pre-releaseNothing published for this version
-
0.3.0-beta30 Jan 2019 pre-releaseNothing published for this version
-
0.3.0-alpha.224 Nov 2018 pre-releaseNothing published for this version
-
0.3.0-alpha.124 Nov 2018 pre-releaseNothing published for this version
-
0.3.0-alpha18 Nov 2018 pre-releaseNothing published for this version
-
0.2.013 Oct 2018 -
0.2.0+112 Nov 2018Nothing published for this version
-
0.1.230 Aug 2018 -
0.1.127 Apr 2018Release notes
Open source →- Fixed some issues when file could not be downloaded the first time it is trying to be retrieved.
-
0.1.014 Apr 2018Release notes
Open source →- Fixed ConcurrentModificationError in cache cleaning
- Added optional headers
- Moved to Dart 2.0
-
0.1.0-rc.124 Mar 2018 pre-releaseNothing published for this version
-
0.0.431 Jan 2018 -
0.0.4+116 Feb 2018Release notes
Open source →- Fixed nullpointer when non-updated file (a 304 response) has no cache-control period.
-
0.0.308 Jan 2018 -
0.0.229 Dec 2017 -
0.0.128 Dec 2017