Thanks. From the Vary Headers section:

--
By default, Django’s cache system creates its cache keys using the 
requested path — e.g., "/stories/2005/jun/23/bank_robbed/". This means 
every request to that URL will use the same cached version, regardless 
of user-agent differences such as cookies or language preferences.
--

Looking at the headers being sent from the server

Vary : Cookie

is being specified. However, I am not setting that in my code.

Maybe the default has changed recently?

The vary docs dont mention how to set back to the default for the entire 
site. (im doing site, not per page cacheing)

Doing some more searching, i came across this bug:

http://code.djangoproject.com/ticket/3586

The session middleware (which I am using) appears to be setting the 
"Vary : Cookies" header. Which is causing the caching problems.

So, I should be able to generate the key correctly now (by passing in 
the Cookies header, but that does not solve the issue of needing to 
remove all references the the page in the cache.

Im pretty stumped at this point. I am using sessions for one item, but 
am not sure if I can use sessions and caching and still have per path 
page caching (and not path / cookie page caching).

mike chambers



Norman Harman wrote:

> http://www.djangoproject.com/documentation/cache/#using-vary-headers
> 
> http://www.djangoproject.com/documentation/cache/#the-low-level-cache-api
> 

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to