What problem does it solve?
Go applications often need fast, reliable caching with strong type-safety. This Skill provides a unified approach to multi-store caching in Go using a generic, store-driven cache library with pluggable backends (memory, Redis, SQLite, PostgreSQL), loader patterns, and batch support to reduce latency and backend load.
Core Features & Use Cases
- Type-safe, generic Cache[T] APIs for Go
- Multi-store backends: memory, redis, sqlite, postgres with backfill chaining
- Loader pattern and cache-aside semantics for on-demand loading
- Batch operations for bulk reads/writes to minimize round-trips
- Iterable stores for databases like SQLite/PostgreSQL
- Codec support for JSON/MessagePack/ Gob and zero-dependency Go
- Background cleanup and MVCC-like concurrency benefits
Quick Start
Create a typed cache with a chosen store (memory, Redis, SQLite, or PostgreSQL) and start using Get/Set and optional loader patterns.