cachette 0.1.1 copy "cachette: ^0.1.1" to clipboard
cachette: ^0.1.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);
}
4
likes
160
pub points
45%
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

Documentation

API reference

License

MIT (license)

More

Packages that depend on cachette