golang-samber-hot

Community

Go in-memory caching with versatile eviction.

Authorsamber
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Go services often suffer from repeated DB or API calls for hot/cold data. This Skill provides a structured in-memory caching approach using samber/hot to balance recency, frequency, and throughput, with built-in loaders, TTL, and metrics.

Core Features & Use Cases

  • 9 eviction algorithms (LRU, LFU, TinyLFU, W-TinyLFU, S3FIFO, ARC, TwoQueue, SIEVE, FIFO)
  • TTL support, singleflight-based loaders, and loader chaining
  • Sharding to reduce lock contention and promote concurrency
  • Stale-while-revalidate, missing-key caching, and Prometheus metrics
  • Production-ready builder patterns with warm-up and Prometheus integration

Quick Start

Set up a Go cache with hot.WTinyLFU, 10_000 capacity, TTL of 5 minutes, janitor, and a basic Get/Set flow.

Dependency Matrix

Required Modules

None required

Components

references

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: golang-samber-hot
Download link: https://github.com/samber/cc-skills-golang/archive/main.zip#golang-samber-hot

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.