Skip to content

v0.5.0

Choose a tag to compare

@github-actions github-actions released this 14 Oct 06:32
· 11 commits to master since this release

0.5.0 contains breaking changes; read
Migrating to 0.5.0
before upgrading. Sessions and OAuth state, deprecated in 0.4.0, are removed,
and the dependency floors are lower. 0.4.1 is the last 0.4.x release.

Added

  • MemoryBackend(max_entries=...) caps the in-memory cache with LRU eviction. (#242)
  • @cached caches a plain function's result, keyed on its arguments. (#248)
  • @cache(coalesce=True) runs the handler once for concurrent misses. (#252)
  • @cache answers HEAD requests from the cached GET response. (#253)
  • Every ttl accepts a datetime.timedelta. (#334)
  • @cache(debug_header=True) sends X-Cache: HIT | MISS | BYPASS. (#335)
  • Python 3.15 is supported. (#459)

Changed

  • @cache checks stale_ttl like ttl, and CacheLock checks ttl when built. (#334)
  • Lower dependency floors: itsdangerous and starlette are no longer required directly, and fastapi>=0.128.2 replaces fastapi>=0.133.0. (#421)
  • A third-party backend delete() that returns None now counts as not removed. (#421)

Removed

  • Sessions and OAuth state are removed, and so is the jwt extra. (#421)
  • @cache no longer counts a session loaded by the removed session middleware as a credential. (#421)

Full changelog: https://fastapi-cachex.readthedocs.io/en/stable/changelog/#050-2026-10-14


Installation

uv add fastapi-cachex==0.5.0

Full commit log: v0.4.1...v0.5.0