Cache library for FastAPI with tag based invalidation
Project description
FastAPI-Caching
Cache library for FastAPI with tag based invalidation
Features
- Automatic response cache fetching using FastAPI dependencies
- Fine-grained control over when to return and set the cache
- Ability to invalidate cached objects based on a concept of associated tags. See examples/redis_app for an example.
Installation
With in-memory support only:
pip install fastapi-caching
NOTE: In-memory backend is only recommended when your app is only run as a single instance.
With redis support (through the aioredis library):
pip install fastapi-caching[redis]
Usage examples
Examples on how to use can be found here.
Changelog
v0.1.2, 2020-08-16
- Feature: Support lazy configuration of caching backend
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
fastapi-caching-0.1.2.tar.gz
(6.6 kB
view details)
Built Distribution
File details
Details for the file fastapi-caching-0.1.2.tar.gz
.
File metadata
- Download URL: fastapi-caching-0.1.2.tar.gz
- Upload date:
- Size: 6.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1792826a7a5faec27f8404541d47c8516d2feb2c0f48c9e7a72841be620565a7 |
|
MD5 | f8123298544f012daf15395de41e34b9 |
|
BLAKE2b-256 | c15fe0edbdd2102d1f9380f94cefce84813564dd35b79481fc08170f14af5a51 |
File details
Details for the file fastapi_caching-0.1.2-py2.py3-none-any.whl
.
File metadata
- Download URL: fastapi_caching-0.1.2-py2.py3-none-any.whl
- Upload date:
- Size: 8.8 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1c46761732c322a8a1e18b1dd6a75767b4edd1c1866d1c130506dbdc400cf30b |
|
MD5 | 73c0695b4915d34f9ca5be1d4a6f71ac |
|
BLAKE2b-256 | 5689b2e7876f41bfea8ac38307ef12c5f124ade1cf39b03d4426a97eae7f0b5b |