What is jetcache-go?
mainjetcache-go is a production-grade cache framework for Go inspired by Java JetCache. It extends the go-redis/cache model by providing:
- Two-level caching: Combines a local cache (e.g.,
FreeCacheorTinyLFU) with a remote cache (e.g.,Redis). - Singleflight miss protection: Uses singleflight to collapse multiple concurrent requests for the same missing key into a single load.
- Typed batch APIs: Provides generic
MGetwith pipeline optimization. - Cache penetration protection: Uses a not-found placeholder strategy to prevent repeated lookups for non-existent keys.
- Extensibility: Interface-driven design allows for custom local/remote providers, codecs, and stats implementations.
- Observability: Built-in statistics and Prometheus plugin integration.