
Effortless API Request Caching with Python and Redis - rednafi
https://rednafi.github.io/digressions/python/2020/05/25/python-redis-cache.html
======
js2
404\. Correct URL is
[https://rednafi.github.io/digressions/python/database/2020/0...](https://rednafi.github.io/digressions/python/database/2020/05/25/python-
redis-cache.html)

When using a cache like this, it’s usually better to serve stale data from the
cache while kicking off a single background worker to refresh the stale data.
Otherwise with significant traffic when the cached item expires you end up
with many concurrent requests to the upstream resource, sometimes termed the
thundering herd problem.

[https://en.wikipedia.org/wiki/Cache_stampede](https://en.wikipedia.org/wiki/Cache_stampede)

