DjangoRedis

Missing cache invalidation causes stale data to be served to users

warning
configurationUpdated Apr 26, 2023(via Exa)
How to detect:

When caching is implemented without a cache invalidation strategy, data updates are not reflected in cached responses, causing users to see outdated information

Recommended action:

Implement event-based cache invalidation using Django signals. Use @receiver(post_save) decorator to call cache.delete() when models are updated. Consider hybrid approach combining time-based and event-based expiry for optimal freshness.