#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

#156 in Caching

Download history 6037/week @ 2024-10-21 8380/week @ 2024-10-28 12444/week @ 2024-11-04 8365/week @ 2024-11-11 14874/week @ 2024-11-18 14945/week @ 2024-11-25 11412/week @ 2024-12-02 12041/week @ 2024-12-09 12319/week @ 2024-12-16 5097/week @ 2024-12-23 5408/week @ 2024-12-30 9553/week @ 2025-01-06 10200/week @ 2025-01-13 11254/week @ 2025-01-20 14747/week @ 2025-01-27 18049/week @ 2025-02-03

55,508 downloads per month
Used in 22 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.4–7MB
~42K SLoC