Repository navigation
fastapi-cache-stable 0.3.0
fastapi-cache-stable 0.3.0 is the first stable release of this community-maintained fork of fastapi-cache2==0.2.2. It retains the fastapi_cache import. Review the migration guide before upgrading.
Highlights
- Requests with
AuthorizationorCookiebypass caching by default; authenticated caching requires an identity-aware key builder. - Stable weak ETags, conditional
If-None-Match, improvedCache-Controlhandling, and bypasses for responses whose status, headers, cookies, or background tasks cannot be safely reproduced. - Targeted key and namespace clearing, Redis standalone
SCAN/UNLINK, and per-instance InMemory storage. - Optional Pydantic v2
TypedJsonCoder, opt-in FastAPI response-model inference, and explicitFastAPICache.init()reconfiguration withreset()orforce=True.
Install
python -m pip install "fastapi-cache-stable[redis]==0.3.0"
python -m pip checkCompatibility and limits
- Python
>=3.8,<3.14; server-side CPython 3.11–3.13 is recommended for best-effort security maintenance. Python 3.8–3.10 are functional legacy-compatibility targets only. - The supported Redis client line is redis-py 4.x. Memcached and DynamoDB remain experimental; Redis Cluster namespace clearing is not implemented.
The repository records a release-scoped acceptance of 21 previously captured open Dependabot advisories. This is not a dismissal of those alerts or a guarantee about downstream applications; see the risk decision.
See the full changelog and PyPI release files.