# patrickmn/go-cache

An in-memory key:value store/cache (similar to Memcached) library for Go, suitable for single-machine applications.

Repository: https://github.com/patrickmn/go-cache
Canonical: https://ross.abutalabs.com/products/go-cache
Homepage: https://patrickmn.com/projects/go-cache/
Language: Go
License: MIT
License Family: permissive
Topics: go, cache, library
Last push: 2023-11-20T05:12:16+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": 5357, "days_push": 1017, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 8844, forks 908 (observed 2026-08-28T04:10:26.002350+00:00)

## What it is
An in-memory key:value store/cache library for Go, similar to Memcached, designed for single-machine applications. It is essentially a thread-safe map with expiration times, requiring no serialization or network transmission.

## Use cases
- cache expensive function results in a Go application
- store session data in memory with expiration
- replace memcached for single-machine apps
- share data safely between goroutines
- persist cache to file to recover from downtime

## When to choose
- your Go app runs on a single machine and needs fast in-memory caching
- you want a simple thread-safe cache without running an external cache server
- you need per-item expiration or no-expiration entries

## When to avoid
- you need a distributed or multi-node cache
- you need a persistent datastore
- you need eviction policies beyond TTL-based expiration

## Facets
- artifact type: library
- maturity: maintenance
- function: caching, concurrency
- domain: developer-tools, backend, performance
- platform: go, cross-platform
- tags: in-memory-cache, key-value-store, expiration, thread-safe, memcached-alternative

## Member repositories
- patrickmn/go-cache (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:10:26.002350+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-29T17:24:48.338229+00:00, confidence not recorded.
  - readme: https://github.com/patrickmn/go-cache (fetched 2026-08-28T04:10:26.002350+00:00, sha 9d94a6c4308d)
  - homepage: https://patrickmn.com/projects/go-cache/ (fetched 2026-08-29T08:25:07.335193+00:00, sha 25e001366522)
  - site_page: https://patrickmn.com/about/life (fetched 2026-08-29T08:25:07.337966+00:00, sha 960a69cf616f)
- Data as of 2026-08-30T08:39:29.467469+00:00.
