DjangoBlog icon indicating copy to clipboard operation
DjangoBlog copied to clipboard

Use of cache.clear() may be risky in production

Open reggiepy opened this issue 5 months ago • 0 comments
trafficstars

The flushall command is a dangerous operation in Redis, as it clears all keys in all databases. I noticed that DjangoBlog uses cache.clear(), which will trigger flushall when Redis is the cache backend. This might not be safe in a production environment, especially if Redis is shared across services or used for other purposes. Could you consider replacing it with a more fine-grained cache deletion strategy?

reggiepy avatar Jun 10 '25 16:06 reggiepy