diff --git a/{{cookiecutter.repo_name}}/requirements.txt b/{{cookiecutter.repo_name}}/requirements.txt index 6be74cd2..7e29bd87 100644 --- a/{{cookiecutter.repo_name}}/requirements.txt +++ b/{{cookiecutter.repo_name}}/requirements.txt @@ -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 diff --git a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/config/settings.py b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/config/settings.py index 8b014a23..15052a84 100644 --- a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/config/settings.py +++ b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/config/settings.py @@ -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