.env
Caching function results
Results are cached by the function’s arguments, so each distinct call gets its own entry.Caching route responses
Direct access
The
memory backend is per-process. Under gunicorn --workers 4 each worker keeps its
own cache, so a hit rate looks worse than it is and invalidation reaches only one
worker. Use redis whenever you run more than one process.