# muesli/cache2go

Concurrency-safe Go caching library with expiration capabilities and access counters

Repository: https://github.com/muesli/cache2go
Canonical: https://ross.abutalabs.com/products/cache2go
Language: Go
License: NOASSERTION
License Family: other
Topics: hacktoberfest
Last push: 2024-07-02T15:31:52+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 4678, "days_push": 792, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2152, forks 504 (observed 2026-08-28T04:06:19.433572+00:00)

## What it is
cache2go is a concurrency-safe, in-memory caching library for Go with per-item expiration (TTL) and access counters. It supports arbitrary key/value types, deletion callbacks, and multiple named cache tables.

## Use cases
- cache expensive function results in memory with a TTL
- add a concurrency-safe key-value cache to a Go service
- expire cached items after a period of inactivity
- track how often cached entries are accessed
- run callbacks when cached items are deleted

## When to choose
- you need a simple, dependency-free in-process cache in Go
- you want per-item TTLs based on last access time
- you need arbitrary Go types as keys and values

## When to avoid
- you need a distributed or shared cache across processes (use Redis or Memcached)
- you need size-bounded eviction like LRU
- you need persistence for cached data

## Facets
- artifact type: library
- maturity: stable
- function: caching, concurrency
- domain: developer-tools, backend, performance
- platform: go, cross-platform
- tags: in-memory-cache, expiration, ttl, access-counters, callbacks

## Member repositories
- muesli/cache2go (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:19.433572+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-30T02:50:39.893261+00:00, confidence not recorded.
  - readme: https://github.com/muesli/cache2go (fetched 2026-08-28T04:06:19.433572+00:00, sha ecbbbbc296f5)
- Data as of 2026-08-30T08:39:29.467469+00:00.
