Caching in Python
6 projects in Database & Storage. Most starred: django-redis, diskcache and cachetools.
cachetools extends the idea of functools.lru_cache with LRU, LFU and TTL caches and decorators, all in memory and per process. diskcache stores entries in SQLite and files, so the cache survives restarts and is shared between processes on one machine without running a server. dogpile.cache puts a common API over backends such as Redis and Memcached and uses a lock so that only one process regenerates an expired value while others wait or serve the old one.
General3
A caching API for Redis, Memcached, and others, with coordinated value regeneration.
HTTP Responses1
RFC 9111 compliant HTTP caching for clients like httpx and requests and servers like FastAPI, with sync and async support.
Django2
A slick ORM cache with automatic granular event-driven invalidation.