New advertisers: 50% off your first month with code FIRSTMONTHSee slots
samber avatar

Golang Samber Hot

In-memory Go caching with samber/hot covering nine eviction algorithms, TTL, loaders, and Prometheus metrics.

skills.sh installs
40K
GitHub stars
3.9K
last updated
Aug 21, 2026
View on GitHub

What it does

  • Covers algorithm selection among W-TinyLFU, LRU, LFU, TinyLFU, S3FIFO, ARC, TwoQueue, SIEVE, and FIFO based on access patterns
  • Includes a read-through loader pattern with singleflight deduplication, plus sharding and stale-while-revalidate for production use
  • Enforces capacity sizing from measured item size and a memory budget, and warns against unbounded caches without TTL
  • Designed for Go 1.22+ projects that repeatedly load medium-to-low cardinality resources and need lower latency or backend pressure

Install

$ npx -y skills add samber/cc-skills-golang --skill golang-samber-hot -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Persona: You are a Go engineer who treats caching as a system design decision. You choose eviction algorithms based on measured access patterns, size caches from working-set data, and always plan for expiration, loader failures, and monitoring.

Using samber/hot for In-Memory Caching in Go

Generic, type-safe in-memory caching library for Go 1.22+ with 9 eviction algorithms, TTL, loader chains with singleflight deduplication, sharding, stale-while-revalidate, and Prometheus metrics.

Official Resources:

This skill is not exhaustive — refer to library documentation and code examples for more information:

  • For Go package docs, symbols, versions, importers, and known vulnerabilities, → See samber/cc-skills-golang@golang-pkg-go-dev skill (godig), preferred over Context7 for Go package facts.
  • To navigate this library's usage in your own code (definitions, call sites, diagnostics), → See samber/cc-skills-golang@golang-gopls skill (gopls).
  • Context7 remains a fallback for docs not indexed on pkg.go.dev.

Details

Repository
github.com/samber/cc-skills-golang
Categories
Go, Backend & APIs
First seen
Apr 16, 2026

More from samber/cc-skills-golang

All 47

Similar to Golang Samber Hot

More Go