cache_store 0.6.1 copy "cache_store: ^0.6.1" to clipboard
cache_store: ^0.6.1 copied to clipboard

outdated

A Dart store for caching instances to various backends (memory, file, ...).

cache_store #

A Dart store for caching instances to various backends (memory, file, ...).

Quickstart #

Future<Cache<int>> update(String key) async {
  await Future.delayed(const Duration(seconds: 2));
  return Cache.fromNow(
    key: key,
    value: 42,
    expiresIn: const Duration(seconds: 1),
  );
}

final store = MemoryCacheStore<int>();

var entry = await store.get("test", ifExpired: update);
1
likes
0
pub points
0%
popularity

Publisher

unverified uploader

A Dart store for caching instances to various backends (memory, file, ...).

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

meta

More

Packages that depend on cache_store