#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

#144 in Caching

Download history 871/week @ 2024-07-31 978/week @ 2024-08-07 1089/week @ 2024-08-14 909/week @ 2024-08-21 921/week @ 2024-08-28 820/week @ 2024-09-04 692/week @ 2024-09-11 3006/week @ 2024-09-18 6548/week @ 2024-09-25 5549/week @ 2024-10-02 5709/week @ 2024-10-09 5884/week @ 2024-10-16 6739/week @ 2024-10-23 10932/week @ 2024-10-30 11191/week @ 2024-11-06 10462/week @ 2024-11-13

40,051 downloads per month
Used in 20 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