rocket_cache 0.0.3
rocket_cache: ^0.0.3 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,
cache: true,
cacheDuration: Duration(days: 1),
);