bond_cache 0.0.4+4 copy "bond_cache: ^0.0.4+4" to clipboard
bond_cache: ^0.0.4+4 copied to clipboard

Cache is a Bond package provides a convenient way to handle caching in app.

example/example.md

Basic usage: #

import 'package:bond_cache/bond_cache.dart';

// Example usage
final user = Cache.get<User>('user', defaultValue: User(id: 1, name: 'Default User'));

// Update the cache
Cache.put<User>('user', User(id: 2, name: 'SALAH'));

// Retrieve the updated value
final updatedUser = Cache.get<User>('user');
print('User: ${updatedUser.name}');

// Check if the key exists
final exists = Cache.has('user');
print('User exists: $exists');

// Remove the value from the cache
Cache.forget('user');

Documentation #

For a comprehensive guide on how to use bond_cache, please refer to the full documentation available in the bond_docs repository under the cache.md file.

Read Full Documentation Here

2
likes
150
points
0
downloads

Publisher

unverified uploader

Weekly Downloads

Cache is a Bond package provides a convenient way to handle caching in app.

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

bond_core, flutter, meta, shared_preferences

More

Packages that depend on bond_cache