#lru-cache #lru #cache #pingora

pingora-lru

LRU cache that focuses on memory efficiency, concurrency and persistence

4 releases (2 breaking)

0.3.0 Jul 12, 2024
0.2.0 May 10, 2024
0.1.1 Apr 18, 2024
0.1.0 Feb 28, 2024

#164 in Caching

Download history 741/week @ 2024-04-04 490/week @ 2024-04-11 658/week @ 2024-04-18 740/week @ 2024-04-25 522/week @ 2024-05-02 704/week @ 2024-05-09 589/week @ 2024-05-16 540/week @ 2024-05-23 420/week @ 2024-05-30 564/week @ 2024-06-06 463/week @ 2024-06-13 742/week @ 2024-06-20 965/week @ 2024-06-27 965/week @ 2024-07-04 939/week @ 2024-07-11 568/week @ 2024-07-18

3,579 downloads per month
Used in 14 crates (via pingora-cache)

Apache-2.0

38KB
840 lines

An implementation of an LRU that focuses on memory efficiency, concurrency and persistence

Features

  • keys can have different sizes
  • LRUs are sharded to avoid global locks.
  • Memory layout and usage are optimized: small and no memory fragmentation

Dependencies

~2.2–7.5MB
~43K SLoC