Skip to content
pubscout

ffcache

1.1.1, released 7 months ago by mix1009.com

File-based key-value store with automatic cache expiration in temporary folders.

$ flutter pub add ffcache
Source repository

What it does

ffcache is a file-based key-value store that saves data in the app's temporary folder and on the web via idb_shim. It automatically expires cached data after a set duration and cleans up old entries upon initialization.

AI-written summary of version 1.1.1, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to store temporary key-value data with expiration times.
  • You want to cache strings, bytes, or JSON data locally.

Skip it when

  • You need a general-purpose permanent key-value store, as the OS can delete temporary files at any time.

Strengths

  • Supports automatic cache expiration and timeouts.
  • Supports strings, bytes, and JSON data.
  • Cross-platform support including iOS, Android, macOS, Windows, Linux, and Web.

Weaknesses

  • Data can be deleted by the OS at any time because it resides in the temporary folder.
  • Not suitable for general-purpose key-value storage.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
2

For web platform usage, calling cache.init() is required.

final cache = FFCache();
await cache.init();
await cache.setString('key', 'value');
final value = await cache.getString('key');

Alternatives

Packages that do the same job and could replace ffcache.

Works with

Packages commonly used together with ffcache: ones it builds on, ones built on it, and its own family.