Skip to content

Commit

Permalink
Please
Browse files Browse the repository at this point in the history
  • Loading branch information
blackrobot committed Apr 19, 2012
1 parent 05531ee commit 7cfeced
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions source/settings/heroku.py
Expand Up @@ -62,18 +62,21 @@
)

# Memcachedddd
CACHES = {
'default': {
'BACKEND': 'django_pylibmc.memcached.PyLibMCCache',
# 'LOCATION': env('MEMCACHE_SERVERS', ''),
'TIMEOUT': 300,
'BINARY': True,
'OPTIONS': {
'tcp_nodelay': True,
'ketama': True,
}
},
}
if 'MEMCACHE_SERVERS' in environ:
CACHES = {
'default': {
'BACKEND': 'django_pylibmc.memcached.PyLibMCCache',
'LOCATION': "%s:11211" % env('MEMCACHE_SERVERS', ''),
'username': env('MEMCACHE_USERNAME', ''),
'password': env('MEMCACHE_PASSWORD', ''),
'TIMEOUT': 300,
'BINARY': True,
'OPTIONS': {
'tcp_nodelay': True,
'ketama': True,
}
},
}
# Only cache for anonymous users
CACHE_MIDDLEWARE_ANONYMOUS_ONLY = True

Expand Down

0 comments on commit 7cfeced

Please sign in to comment.