YokedCache
One async caching API. Five backends behind it.

A Python caching library that started as code inside Project Yoked, then got pulled out and rebuilt because every caching library I looked at made something simple far more complicated than it needed to be. One async API works identically across in-process memory, Redis, Memcached, disk and SQLite, with tagging and auto-invalidation built in. It runs in the backend of every project I ship now.
I was building a cache layer inside Project Yoked and kept looking at the caching libraries already out there wondering why something this simple had to be this complicated. So I pulled the code out, rebuilt it properly, and named it after the project it came from — Yoked, meaning shredded, jacked, built.
The result is one async-first API that behaves identically across in-process memory, Redis, Memcached, disk and SQLite — memory works with no setup at all, so tests need no infrastructure. Tag a key, invalidate the tag, done — no hand-rolled cache-busting logic. Beyond get and set it does the parts people usually skip: pattern invalidation, SQLAlchemy-friendly helpers, optional HTTP caching middleware for Starlette, and production observability through Prometheus, StatsD and OpenTelemetry.
It is the one library I reach for without thinking. Every backend I build now runs on it.
What it does
- One API across memory, Redis, Memcached, disk and SQLite
- Invalidation by tag or pattern, not just by key
- Optional Starlette HTTP caching middleware
- Prometheus, StatsD and OpenTelemetry built in
- Memory backend needs zero setup — tests run with no infra
Built with
- Python
- asyncio
- Redis
- Memcached
- SQLAlchemy
- Starlette
MIT licensed. Python 3.10+.