simple_lru_cache 0.2.0 copy "simple_lru_cache: ^0.2.0" to clipboard
simple_lru_cache: ^0.2.0 copied to clipboard

A simple Least Recently Used (LRU) cache implementation in Dart.

LRU Cache #

A simple Least Recently Used (LRU) cache implementation in Dart.

Usage #

import 'package:simple_lru_cache/simple_lru_cache.dart';

void main() {
    final cache - LRUCache<int, String>(2);
    cache.put(1, 'one');
    cache.put(2, 'two');
    print(cache.get(1)); // one
    print(cache.put(3, 'three'));
    print(cache.get(2)); // Exception thrown
}
1
likes
0
points
43
downloads

Publisher

unverified uploader

Weekly Downloads

A simple Least Recently Used (LRU) cache implementation in Dart.

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

More

Packages that depend on simple_lru_cache