flutter_lru_cache 1.0.2 copy "flutter_lru_cache: ^1.0.2" to clipboard
flutter_lru_cache: ^1.0.2 copied to clipboard

flutter/dart lru cache.

lru_cache #

flutter/dart LRU缓存


final lruCache = LRUCache<int, String>(3);

lruCache[1] = "A";
lruCache[2] = "B";
lruCache[3] = "C";
print(lruCache);

print(lruCache[1]); // 访问key=1,将其移动到最近使用的位置
lruCache[4] = "D"; // 添加新的元素,触发移除最久未使用的元素
print(lruCache);

1
likes
130
points
50
downloads

Publisher

unverified uploader

Weekly Downloads

flutter/dart lru cache.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

More

Packages that depend on flutter_lru_cache