Merge pull request #90 from theskumar/fix/heroku-memcache-settings

fix(settings): fixes wrong cache config used for heroku
This commit is contained in:
Daniel Greenfeld 2014-03-23 18:55:16 -07:00
commit 3c2f1695f2
2 changed files with 8 additions and 2 deletions

View File

@ -1,4 +1,5 @@
# This file is here because many Platforms as a Service look for
# requirements.txt in the root directory of a project.
pylibmc==1.2.3 #
pylibmc==1.2.3
django-heroku-memcacheify==0.5
-r requirements/production.txt

View File

@ -388,7 +388,12 @@ class Production(Common):
########## CACHING
# Only do this here because thanks to django-pylibmc-sasl and pylibmc memcacheify is painful to install on windows.
CACHES = values.CacheURLValue(default="memcached://127.0.0.1:11211")
try:
# See: https://github.com/rdegges/django-heroku-memcacheify
from memcacheify import memcacheify
CACHES = memcacheify()
except ImportError:
CACHES = values.CacheURLValue(default="memcached://127.0.0.1:11211")
########## END CACHING
########## Your production stuff: Below this line define 3rd party libary settings