golang-samber-hot
Guides Go engineers in using the samber/hot in-memory caching library, including choosing eviction algorithms, TTLs, loaders, sharding, and Prometheus metrics.
What it does
In-memory caching in Golang using samber/hot — eviction algorithms (LRU, LFU, TinyLFU, W-TinyLFU, S3FIFO, ARC, TwoQueue, SIEVE, FIFO), TTL, cache loaders, sharding, stale-while-revalidate, missing key caching, and Prometheus metrics. Apply when using or adopting samber/hot, when the codebase imports github.com/samber/hot, or when the project repeatedly loads the same medium-to-low cardinality resources at high frequency and needs to reduce latency or backend pressure.
Quality judgment
Well-scoped, accurate-feeling skill with a strong algorithm selection table, concrete capacity-sizing methodology, and clear pitfalls. Code examples cover basics and loaders but omit sharding, SWR, and missing-cache config despite referencing them; those are deferred to external reference files.