cachette 1.0.0-dev.1 copy "cachette: ^1.0.0-dev.1" to clipboard
cachette: ^1.0.0-dev.1 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);
}
3
likes
0
pub points
47%
popularity

Publisher

verified publisheralxbkr.xyz

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

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

elegant

More

Packages that depend on cachette