DjangoBlog
DjangoBlog copied to clipboard
Use of cache.clear() may be risky in production
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?