How do I tell memcache to ignore the django admin page?

Posted by Chris on Server Fault See other posts from Server Fault or by Chris
Published on 2012-12-12T04:37:44Z Indexed on 2012/12/12 5:05 UTC
Read the original article Hit count: 214

Filed under:
|
|
|
|

I'm running memcache infront of django without any explicit configuration in my code. I.e. nothing more than

MIDDLEWARE_CLASSES = (
    'django.middleware.cache.UpdateCacheMiddleware',
    ...
    'django.middleware.cache.FetchFromCacheMiddleware',
    )

and

CACHE_BACKEND = 'memcached://127.0.0.1:11211/'

in my settings.py. This works great, in fact so great that it's caching my admin page leaving me no way to moderate live actions on the site until the cache refetches the data. Is there a regex I can throw somewhere to let memcached know to leave my admin page alone? (I'm also using nginx and gunicorn)

© Server Fault or respective owner

Related posts about nginx

Related posts about cache