I've enabled caching via UpdateCacheMiddleware and  
FetchFromCacheMiddleware, placed at the beginning and end of  
middleware, respectively.

When loading a URL, I'm getting a Vary: Accept-Encodinge.

Problem is, each page load Google Analytics keeps changing  
__utm(a,b,c,z) cookies, apparently invalidating cache.

I'm using SSL on Apache with FastCGI.

settings.py:
> CACHE_BACKEND = 'memcached://127.0.0.1:11211/'
>
> ...
>
> MIDDLEWARE_CLASSES = (
>     'django.middleware.cache.UpdateCacheMiddleware',
>     'django.middleware.common.CommonMiddleware',
>     'django.contrib.sessions.middleware.SessionMiddleware',
>     'django.contrib.auth.middleware.AuthenticationMiddleware',
>     'django.middleware.doc.XViewMiddleware',
>       'django.middleware.locale.LocaleMiddleware',
>       'django.middleware.http.ConditionalGetMiddleware',
>       'django.middleware.gzip.GZipMiddleware',
>     'django.middleware.cache.FetchFromCacheMiddleware',
>       #'debug_toolbar.middleware.DebugToolbarMiddleware',
> )
>
> CACHE_MIDDLEWARE_SECONDS = 300 # 5 Minutes = 300
> CACHE_MIDDLEWARE_KEY_PREFIX = ""


Response Headers:
> Cache-Control: max-age=300
> Connection: Keep-Alive
> Content-Encoding: gzip
> Content-Language: en
> Content-Length: 2119
> Content-Type: text/html; charset=utf-8
> Date: Mon, 29 Sep 2008 23:27:53 GMT
> Etag: "936d0ad516a45ffed5a34baa32d10f66"
> Expires: Mon, 29 Sep 2008 23:32:53 GMT
> Keep-Alive: timeout=15, max=500
> Last-Modified: Mon, 29 Sep 2008 23:27:53 GMT
> Ms-Author-Via: DAV
> Server: Apache/2.2.8 (Unix) mod_ssl/2.2.8 OpenSSL/0.9.7l PHP/5.2.6  
> mod_fastcgi/2.4.2
> Vary: Accept-Encoding,Accept-Language,Cookie


-- 
Cortland Klein <[EMAIL PROTECTED]> +1 408 506 9791
Web Developer, Media and Technology
Apple Retail Training and Development
1 Infinite Loop, MS 49-SM
Cupertino, CA 95014
http://apple.com/retail/


--~--~---------~--~----~------------~-------~--~----~
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