About:
> The common pattern for application level caching
data = cache.get('stuff')
if data is None:
data = list(Stuff.objects.all())
cache.set('stuff', data)
return data
I'm wondering if you simplified the example or if you are just not preventing cache regen race conditions ?Some other frameworks just put back the expired data for a few seconds while the new one is being regenerated to avoid having multiple workers building the same thing.
e.g. rails: https://github.com/rails/rails/blob/3182295ce2fa01b02cb9af0b...