# tkem/cachetools

Extensible memoizing collections and decorators

Repository: https://github.com/tkem/cachetools
Canonical: https://ross.abutalabs.com/products/cachetools
Language: Python
License: MIT
License Family: permissive
Last push: 2026-08-01T21:20:48+00:00

## Health v2 (maintenance only)
Score: 75/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 95, release rhythm 35, longevity 100
- inputs: {"age_days": 4547, "days_push": 32, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2776, forks 204 (observed 2026-08-28T04:07:21.427442+00:00)

## What it is
A Python library providing extensible memoizing collections and decorators, including cache classes like LRUCache and TTLCache with pluggable eviction policies. It offers a @cached decorator as a drop-in alternative to functools.lru_cache with more cache algorithm options.

## Use cases
- memoize expensive function calls in python
- cache with ttl expiration
- lru cache with max size for python functions
- speed up recursive functions with dynamic programming
- cache api responses for a limited time
- custom cache eviction policies

## When to choose
- you need in-process memoization with configurable eviction policies like LRU, TTL, or LFU
- you want a more flexible alternative to functools.lru_cache
- you need bounded mutable mappings that act as caches

## When to avoid
- you need a distributed or shared cache across processes - use Redis or Memcached instead
- you need async function caching out of the box - cachetools is synchronous (see asyncache)
- you need persistent caching across restarts

## Facets
- artifact type: library
- maturity: stable
- function: caching, developer-tools
- domain: developer-tools, performance
- platform: python, cross-platform
- tags: memoization, lru-cache, ttl-cache, decorators, in-memory-cache, python

## Member repositories
- tkem/cachetools (main) score 75

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:21.427442+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-30T08:16:32.697841+00:00, confidence not recorded.
  - readme: https://github.com/tkem/cachetools (fetched 2026-08-28T04:07:21.427442+00:00, sha fc28ed6f8e0e)
  - registry_pypi: https://pypi.org/pypi/cachetools/json (fetched 2026-08-29T09:55:51.006229+00:00, sha 154b3a50cb4b)
- Data as of 2026-08-30T08:39:29.467469+00:00.
