Re: removing page from cache (memcache)

2008-07-03 Thread Mike Chambers
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 o

Re: removing page from cache (memcache)

2008-07-03 Thread Norman Harman
Mike Chambers wrote: > I just did some local debugging, and notice something interesting. The > cache key appears to be generated based on a hash of the request headers. > > This means that visiting the same page in two different browsers will > generate 2 unique keys, which means that the cach

Re: removing page from cache (memcache)

2008-07-03 Thread Mike Chambers
I just did some local debugging, and notice something interesting. The cache key appears to be generated based on a hash of the request headers. This means that visiting the same page in two different browsers will generate 2 unique keys, which means that the cache isnt used. For example, on m

Re: removing page from cache (memcache)

2008-07-03 Thread Mike Chambers
Upon looking at the source, it looks like I am using an out of date way to generate the cache key: http://code.djangoproject.com/browser/django/trunk/django/utils/cache.py Does anyone have an example of how to generate the key from just the page path? i.e. /about/ The : get_cache_key API tak

removing page from cache (memcache)

2008-07-02 Thread Mike Chambers
I am using memcache for my site, and it is working well except for one issue. When a user enters a comment, I redirect them to the page they commented from. However, since the page is cached they dont see the comment. My first fix was to just appened a query string to the URL, but this then m