t_cache 0.0.21 copy "t_cache: ^0.0.21" to clipboard
t_cache: ^0.0.21 copied to clipboard

Efficiently store and retrieve data with TTL, LRU eviction.

tCache #

Efficiently store and retrieve data with TTL, LRU eviction.

Usage Example:

import 'package:cache_manager/cache_manager.dart';

void main() {
  final cache = CacheManager();

  // Setting a cache item
  await cache.setItem('key1', 'value1', ttl: Duration(minutes: 15));

  // Getting a cache item
  String value = cache.getItem('key1');
  print(value);  // Outputs: 'value1'

  // Removing a cache item
  await cache.removeItem('key1');
}
1
likes
140
pub points
2%
popularity

Publisher

unverified uploader

Efficiently store and retrieve data with TTL, LRU eviction.

Repository (GitHub)
View/report issues

Documentation

API reference

License

ISC (license)

Dependencies

flutter, t_helpers, tlogger

More

Packages that depend on t_cache