0

My project uses Django version 4.1.9 and cachalot 2.5.3 (latest version). I just added the CACHES (BACKEND: "django.core.cache.backends.redis.RedisCache") option in Django and added the UpdateCacheMiddleware and FetchFromCacheMiddleware middlewares plus added "cachalot" to my installed_apps. Now when I patch/ put anything I am getting a correct and updated response (200 with the changes) but when I try to GET the resource it still shows the old response (200 without the changes).

Why doesn't Django cachalot invalidate the cache on patching the objects?

creyD
  • 1,972
  • 3
  • 26
  • 55
  • I suppose this is because Django per-site caches are not to use with django cachalot. I suspect that the site is cached and even though cachalot invalidates the SQL cache the stale site still gets delivered, as Django doesn't even run a new SQL query. – creyD May 25 '23 at 09:47

0 Answers0