#lru-cache #lru #pingora #memory #concurrency #persistence

pingora-lru

LRU cache that focuses on memory efficiency, concurrency and persistence

5 releases (3 breaking)

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

#147 in Caching

Download history 1415/week @ 2024-09-14 5602/week @ 2024-09-21 6226/week @ 2024-09-28 4530/week @ 2024-10-05 6508/week @ 2024-10-12 4736/week @ 2024-10-19 9164/week @ 2024-10-26 12877/week @ 2024-11-02 8204/week @ 2024-11-09 14403/week @ 2024-11-16 13987/week @ 2024-11-23 10733/week @ 2024-11-30 13090/week @ 2024-12-07 13016/week @ 2024-12-14 5996/week @ 2024-12-21 4032/week @ 2024-12-28

37,081 downloads per month
Used in 23 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

~1.4–6MB
~29K SLoC