tags:

views:

34

answers:

0

So I'm using per-site caching on a project and I've observed the following, which is kind of confusing. When I load a flat page in my browser then change it through admin and then do a refresh (within the cache timeout) there is no change in the page--as expected. However when I stat a new session in a different browser and load the page (still within the timeout) the app is hit instead of the cache, with the

Isn't the cache key generated from the URL? it seems that the session state is getting in there somewhere, which is causing a cache miss.

MIDDLEWARE_CLASSES = (
    'django.middleware.cache.UpdateCacheMiddleware',
    'django.middleware.common.CommonMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.middleware.gzip.GZipMiddleware', 
    'django.middleware.http.ConditionalGetMiddleware', 
    'django.middleware.doc.XViewMiddleware',
    'ittybitty.middleware.IttyBittyURLMiddleware',
    'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware',
    'maintenancemode.middleware.MaintenanceModeMiddleware',
    'djangodblog.middleware.DBLogMiddleware',
    'SSL.middleware.SSLRedirect', #SSL middleware to handle SSL
    'django.middleware.cache.FetchFromCacheMiddleware',
)