I'm using django 1.3 in my app. I need to organize caching, which satisfies following rules:
- using memcached as cache backend
- using @cache_page decorator in views, which I want to cache
- each non-authorized (anonymous) user sees cached version of the page (so django should deliver cached version of the page);
- for each authorized user django should generate new version of page (non-cached) and deliver it.
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.