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),
);