Troubleshooting & FAQ¶
Common issues¶
Cache not updating after writes¶
- Ensure you use
cached_dependencyand callcommit()to trigger invalidation. - Pass
table_namewhen wrapping the dependency.
Redis connection errors¶
- Verify
redis_urland network connectivity. - Test with
yokedcache ping.
Serialization errors¶
- Switch serialization:
SerializationMethod.PICKLE. - Ensure objects are JSON-serializable or provide custom encoders.
Keys not found¶
- Confirm
key_prefixmatches in producer/consumer. - Check tags and patterns when invalidating.
FAQ¶
- How do I disable caching for a route? Call the underlying function directly or set
ttl=0. - How do I warm the cache? Use
warm_cachehelper or CLIwarmwith a config file. - Does it work without FastAPI? Yes, use
@cachedandYokedCachedirectly.