simple_lru_cache 0.1.0 copy "simple_lru_cache: ^0.1.0" to clipboard
simple_lru_cache: ^0.1.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:lru_cache/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)); // null
}
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