eko/gocache
☔️ A complete Go cache library that brings you multiple ways of managing your caches observed · 2026-08-28
Health v2 · maintenance only
96/100
- Activity 94
- Release rhythm 95
- 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: 2
- age_days: 2524
- days_rel: 38
- days_push: 38
- n_releases_24m: 14
Adoption not part of the score
2881 stars · 223 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-29, confidence not recorded
Gocache is an extensible Go caching library providing a unified API over multiple cache stores such as in-memory (bigcache, ristretto, go-cache, freecache), Redis, Memcache, Pegasus, and Hazelcast. It supports chained caches with priority ordering, loadable caches via callbacks, tag-based invalidation, generics, and Prometheus metrics.
Use cases
- cache data in Go with a unified API across memory and Redis
- add a memory cache that falls back to a shared distributed cache
- track cache hits, misses, and set errors with Prometheus
- invalidate cached items by expiration time or tags
- automatically load data into cache via a callback function
- marshal and unmarshal cached values as Go structs
When to choose
- you need one consistent cache interface across multiple backends in Go
- you want layered caching (local memory plus distributed Redis)
- you need cache usage metrics exported to Prometheus
- you want tag-based or expiration-based cache invalidation
When to avoid
- you only need a simple single in-memory cache with no abstraction
- your project is not written in Go
- you need features like cross-instance invalidation or persistence built in
Facets
library · maturity active
caching serialization monitoring developer-tools backend databases web-development go cross-platform cache-library multi-store chain-cache redis memcache ristretto bigcache prometheus-metrics tag-invalidation generics
2 sources
- readme: https://github.com/eko/gocache · fetched 2026-08-28 · 2cc1b1d72361
- homepage: https://vincent.composieux.fr/article/i-wrote-gocache-a-complete-and-extensible-go-cache-library/ · fetched 2026-08-29 · b6f45856fc4e
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| eko/gocache | main | 96 |
For agents
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem