开发者

Django Per-site caching using memcached

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.middlewa开发者_JS百科re.SSLRedirect', #SSL middleware to handle SSL
    'django.middleware.cache.FetchFromCacheMiddleware',
)
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜