# allegro/bigcache

Efficient cache for gigabytes of data written in Go.

Repository: https://github.com/allegro/bigcache
Canonical: https://ross.abutalabs.com/products/bigcache
Homepage: http://allegro.tech/2016/03/writing-fast-cache-service-in-go.html
Language: Go
License: Apache-2.0
License Family: permissive
Topics: cache, performance, caching, golang-library, hacktoberfest
Last push: 2026-08-17T03:52:44+00:00

## Health v2 (maintenance only)
Score: 87/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 98, release rhythm 66, longevity 100
- inputs: {"age_days": 3815, "days_push": 16, "days_rel": 19, "gap_med": null, "n_releases_24m": 1}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 8155, forks 610 (observed 2026-08-28T04:10:13.912662+00:00)

## What it is
BigCache is a fast, concurrent, evicting in-memory cache library for Go designed to hold gigabytes of entries without GC overhead by storing data as byte slices on the heap. It supports sharding, TTL-based eviction, size limits, and removal callbacks.

## Use cases
- cache gigabytes of data in a Go service without GC pauses
- add a fast in-process key-value cache to a Go API
- store millions of entries in memory with predictable performance
- cache serialized objects with TTL expiration in Go
- replace map-based caching that causes high GC pressure

## When to choose
- you need a high-throughput in-memory cache inside a single Go process
- GC pauses from large maps are hurting your service's latency
- you can store entries as byte slices and handle serialization yourself

## When to avoid
- you need a distributed or shared cache across multiple instances (use Redis instead)
- you need to cache complex Go objects without serialization overhead
- your dataset is small enough that a plain map with sync.RWMutex suffices

## Facets
- artifact type: library
- maturity: stable
- function: caching
- domain: performance, backend, developer-tools
- platform: go, windows, cross-platform
- tags: in-memory-cache, gc-friendly, byte-slice-storage, sharded-cache, golang, linux, macos

## Member repositories
- allegro/bigcache (main) score 87

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:10:13.912662+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:29:45.710046+00:00, confidence not recorded.
  - readme: https://github.com/allegro/bigcache (fetched 2026-08-28T04:10:13.912662+00:00, sha 8fdc34ceebee)
  - homepage: http://allegro.tech/2016/03/writing-fast-cache-service-in-go.html (fetched 2026-08-29T08:28:29.033719+00:00, sha 17f12da67f58)
- Data as of 2026-08-30T08:39:29.467469+00:00.
