lfu_cache 1.0.0 lfu_cache: ^1.0.0 copied to clipboard
High performance LFU cache implementation based on http://dhruvbird.com/lfu.pdf
example/lfu_cache_example.dart
import 'package:lfu_cache/lfu_cache.dart';
void main() {
const maxCacheSize = 2;
const evictionCount = 1;
final cache = LFUCache(maxCacheSize, evictionCount);
cache.put(1, true);
cache.put(2, true);
cache.put(3, true);
print(cache.get(1));
}