dgraph-io/ristretto
A high performance memory-bound Go cache observed · 2026-08-28
Health v2 · maintenance only
89/100
- Activity 92
- Release rhythm 80
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: 60.0
- age_days: 2759
- days_rel: 57
- days_push: 49
- n_releases_24m: 9
Adoption not part of the score
6983 stars · 444 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-29, confidence not recorded
Ristretto is a high-performance, fully concurrent in-memory cache library for Go, built originally for Dgraph. It uses a TinyLFU admission policy paired with SampledLFU eviction to deliver high hit ratios and throughput, with cost-based eviction and optional metrics.
Use cases
- add a fast in-memory cache to a Go application
- cache database query results in memory
- reduce contention in a highly concurrent Go service
- cache with cost-based eviction for variable-size items
- improve cache hit ratios over a plain map or LRU
- monitor cache hit ratio and throughput metrics
When to choose
- you need a production-ready, concurrent memory-bound cache in Go
- hit ratio and throughput under heavy concurrency matter
- you want cost-based eviction for items of varying sizes
When to avoid
- you need a distributed or shared cache across processes (use Redis or similar)
- your project is not written in Go
- you need persistent or disk-backed caching
Facets
library · maturity stable
caching developer-tools performance databases go cross-platform in-memory-cache lfu-eviction tinylfu concurrent generics
1 source
- readme: https://github.com/dgraph-io/ristretto · fetched 2026-08-28 · 96c52b4ae686
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| dgraph-io/ristretto | main | 89 |
For agents
markdown · JSON · MCP: product_card(name="dgraph-io/ristretto")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem