cachette 1.0.0 copy "cachette: ^1.0.0" to clipboard
cachette: ^1.0.0 copied to clipboard

A simple and in-memory cache, designed to fulfil the most basic use cases in an elegant way.

example/example.dart

import 'package:cachette/cachette.dart';

void main(List<String> args) async {
  final cachette = Cachette<int, String>(3);
  cachette.evictionStream.listen(print);
  cachette.add(0, 'zero');
  cachette.add(1, 'one');
  cachette.add(2, 'two');
  print(cachette[0]);
  cachette.add(3, 'three');
  cachette[4] = 'four';
  await Future.delayed(Duration(milliseconds: 100));
  print(cachette.values);
}
5
likes
160
points
109
downloads

Publisher

verified publisheralxbkr.xyz

Weekly Downloads

A simple and in-memory cache, designed to fulfil the most basic use cases in an elegant way.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

elegant

More

Packages that depend on cachette