rocket_cache 0.0.2 copy "rocket_cache: ^0.0.2" to clipboard
rocket_cache: ^0.0.2 copied to clipboard

A persistence and caching layer for the Rocket package.

Rocket Cache #

A persistence and caching layer for the Flutter Rocket package.

Features #

  • Simple key-value persistence using shared_preferences.
  • Automatically handles serialization for RocketModel.
  • Support for cache duration/expiration.

Getting Started #

Initialize the cache storage:

await RocketCache.init();

Usage #

Use it directly with RocketClient:

client.request(
  'posts',
  model: postModel,
  cacheKey: 'all_posts',
  cacheDuration: Duration(days: 1),
);
0
likes
140
points
0
downloads

Publisher

unverified uploader

Weekly Downloads

A persistence and caching layer for the Rocket package.

Documentation

API reference

License

MIT (license)

Dependencies

flutter, shared_preferences

More

Packages that depend on rocket_cache