#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

#157 in Caching

Download history 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 14715/week @ 2025-01-27 19673/week @ 2025-02-03 16864/week @ 2025-02-10 12338/week @ 2025-02-17 15379/week @ 2025-02-24 11602/week @ 2025-03-03

58,095 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.2–7MB
~41K SLoC