Skip to content

Instantly share code, notes, and snippets.

@rafaelcaricio
Created November 2, 2010 18:12
Show Gist options
  • Save rafaelcaricio/660039 to your computer and use it in GitHub Desktop.
Save rafaelcaricio/660039 to your computer and use it in GitHub Desktop.
Parte do settings.py
# ...
CACHE_BACKEND = 'memcached://127.0.0.1:11211/'
# criado por mim
CACHE_KEY_PREFIX = 'easyproject'
CACHE_IGNORE_REGEXPS = (
r'/admin.*',
)
# minha configuração de middlewares ficou assim:
MIDDLEWARE_CLASSES = (
'django.middleware.cache.UpdateCacheMiddleware',
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.cache.FetchFromCacheMiddleware',
'easyform.nginx_cache_middleware.NginxCacheMiddleware',
)
# ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment