# karlseguin/ccache

A golang LRU Cache for high concurrency

Repository: https://github.com/karlseguin/ccache
Canonical: https://ross.abutalabs.com/products/karlseguin-ccache
Language: Go
License: MIT
License Family: permissive
Last push: 2026-01-13T10:52:38+00:00

## Health v2 (maintenance only)
Score: 59/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 62, release rhythm 33, longevity 100
- inputs: {"age_days": 4702, "days_push": 232, "days_rel": 237, "gap_med": 232.0, "n_releases_24m": 3}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1396, forks 122 (observed 2026-08-28T04:04:36.624257+00:00)

## What it is
CCache is a Go in-memory LRU cache library designed for high-concurrency workloads. It reduces lock contention via sharded buckets, a promotion window, and a buffered channel that queues promotions to a single background worker.

## Use cases
- cache frequently accessed data in a Go service
- high-concurrency in-memory caching with low lock contention
- serve slightly stale content while refreshing in the background
- cache with per-item TTLs and expiration control
- sharded LRU cache for large key sets

## When to choose
- you need a thread-safe LRU cache in Go under heavy concurrent access
- you want configurable sharding, promotion, and pruning behavior
- you want to serve stale values while re-fetching fresh data

## When to avoid
- you need a distributed or shared cache across processes (use Redis or similar)
- you need persistence or eviction policies beyond LRU with TTL
- your workload is single-threaded and low volume, where a simple map suffices

## Facets
- artifact type: library
- maturity: stable
- function: caching
- domain: developer-tools, backend, performance
- platform: go, cross-platform
- tags: lru-cache, in-memory-cache, high-concurrency, sharded-cache, ttl

## Member repositories
- karlseguin/ccache (main) score 59

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:36.624257+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:39:19.295380+00:00, confidence not recorded.
  - readme: https://github.com/karlseguin/ccache (fetched 2026-08-28T04:04:36.624257+00:00, sha 3718dace053f)
- Data as of 2026-08-30T08:39:29.467469+00:00.
