From 86a3fc1b047d7a3430253a00545ef6082b322fb7 Mon Sep 17 00:00:00 2001 From: Sergio Oliveira Date: Fri, 18 Oct 2013 15:25:34 -0300 Subject: [PATCH] Using memcached for caching --- puppet/modules/colab/manifests/requirements.pp | 5 +++++ requirements.txt | 1 + src/colab/custom_settings.py | 7 +++++++ 3 files changed, 13 insertions(+), 0 deletions(-) diff --git a/puppet/modules/colab/manifests/requirements.pp b/puppet/modules/colab/manifests/requirements.pp index c2cafb6..e992721 100644 --- a/puppet/modules/colab/manifests/requirements.pp +++ b/puppet/modules/colab/manifests/requirements.pp @@ -88,4 +88,9 @@ class colab::requirements { package { 'openjdk-7-jre': ensure => installed, } + + package { 'memcached': + ensure => installed, + } + } diff --git a/requirements.txt b/requirements.txt index 28fd8a8..0225b8c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -13,6 +13,7 @@ pysolr==2.1 etiquetando==0.1 html2text django-taggit +python-memcached gunicorn gevent diff --git a/src/colab/custom_settings.py b/src/colab/custom_settings.py index fc0e709..85e5098 100644 --- a/src/colab/custom_settings.py +++ b/src/colab/custom_settings.py @@ -63,6 +63,13 @@ DATABASES = { } } +CACHES = { + 'default': { + 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache', + 'LOCATION': '127.0.0.1:11211', + } +} + DATABASE_ROUTERS = ['colab.routers.TracRouter',] INSTALLED_APPS = INSTALLED_APPS + ( -- libgit2 0.21.2