# VictoriaMetrics/fastcache

Fast thread-safe inmemory cache for big number of entries in Go. Minimizes GC overhead

Repository: https://github.com/VictoriaMetrics/fastcache
Canonical: https://ross.abutalabs.com/products/fastcache
Language: Go
License: MIT
License Family: permissive
Topics: golang, go, cache, inmemory-cache, fast, caching, caching-library
Last push: 2026-06-15T17:08:51+00:00

## Health v2 (maintenance only)
Score: 74/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 87, release rhythm 41, longevity 100
- inputs: {"age_days": 2841, "days_push": 79, "days_rel": 392, "gap_med": 12, "n_releases_24m": 4}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2370, forks 194 (observed 2026-08-28T04:06:41.740441+00:00)

## What it is
fastcache is a fast, thread-safe in-memory cache library for Go designed to hold a large number of entries with minimal garbage collection overhead. It automatically evicts old entries when reaching a configured maximum size and supports saving/loading the cache to and from files.

## Use cases
- cache millions of key-value entries in a Go service without GC pauses
- replace Go maps or sync.Map for high-throughput concurrent caching
- add an in-process cache with automatic eviction at a fixed memory budget
- persist cache contents to disk and reload on process restart
- speed up hot-path lookups in multi-core Go applications

## When to choose
- you need a fast in-memory cache in Go with minimal GC overhead
- you store a very large number of entries and standard maps cause GC pressure
- you want a simple API with automatic size-based eviction
- you need to snapshot the cache to a file and restore it later

## When to avoid
- you need a distributed or networked cache like Redis or Memcached
- you need TTL-based per-entry expiration
- you need rich eviction policies like LRU or LFU
- your dataset is small enough that a plain Go map suffices

## Facets
- artifact type: library
- maturity: stable
- function: caching
- domain: developer-tools, performance, backend
- platform: go, windows, cross-platform
- tags: inmemory-cache, thread-safe, low-gc-overhead, key-value-cache, go-library, linux, macos

## Member repositories
- VictoriaMetrics/fastcache (main) score 74

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:41.740441+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:35:24.557609+00:00, confidence not recorded.
  - readme: https://github.com/VictoriaMetrics/fastcache (fetched 2026-08-28T04:06:41.740441+00:00, sha cc1dc9a06260)
- Data as of 2026-08-30T08:39:29.467469+00:00.
