finds.dev← search

// the find

mgtv-tech/jetcache-go

★ 509 · Go · BSD-2-Clause · updated Feb 2026

Redis cache library for Go

jetcache-go is a two-level cache library for Go that layers an in-process cache (FreeCache or TinyLFU) in front of Redis. It's a port of Java's JetCache, targeting services that need to cut Redis round-trips without hand-rolling their own L1 cache. Best fit for teams running high-read Go services on Redis who've already hit latency or rate limits.

The singleflight integration for cache misses is the right call — collapses thundering-herd on cold keys without any boilerplate from the caller. Generic MGet with pipelined Redis fetches is genuinely useful for batch-heavy workloads and avoids the N+1 anti-pattern. Cross-process local cache invalidation (v1.1.1+) via pub/sub means L1 caches don't serve stale data indefinitely after a write, which is the hardest correctness problem in two-level caching. The not-found placeholder strategy for cache penetration is a simple, well-understood fix that many cache libraries skip.

509 stars and a MGTV-internal origin means this is production-tested at one company's scale, not broadly battle-hardened — the API surface may shift without the pressure of a large external user base. The auto-refresh feature is convenient but the semantics around refresh failures and TTL extension during refresh are easy to misunderstand, and the docs don't surface the failure modes clearly. Only go-redis v9 is supported as the remote adapter; if you're on a different Redis client or Cluster mode with client-side sharding, you're writing your own adapter. The codec story (JSON, msgpack, sonic) is fine but sonic is Linux/amd64-only, which will silently break on Apple Silicon or Windows dev machines if someone picks it without reading the embedded-components doc.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →