Reputation: 6657
I'm using django 1.3 in my app. I need to organize caching, which satisfies following rules:
How I can do it? I tried using two decorators below the view:
@cache_page(108000)
@vary_on_cookie
but when I logged in, first I see the new data, when after updating the data (directly in database by using phpMyAdmin) I refresh the page and see previous content version.
Upvotes: 1
Views: 555
Reputation: 1298
It is probably what you need https://docs.djangoproject.com/en/dev/ref/settings/#std:setting-CACHE_MIDDLEWARE_ANONYMOUS_ONLY
Upvotes: 1