Permalink
Browse files

Enable Memcached

  • Loading branch information...
shsu committed Jun 28, 2012
1 parent 14b132f commit 5090e4286479b9caadaffbad8a5cc79888026710
Showing with 12 additions and 6 deletions.
  1. +8 −0 settings.py
  2. +4 −6 stackato.yml
View
@@ -27,6 +27,12 @@
'HOST': url.hostname,
'PORT': url.port,
}
+ CACHES = {
+ 'default': {
+ 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
+ 'LOCATION': os.getenv('MEMCACHE_URL'),
+ }
+ }
if url.scheme == 'postgres':
DATABASES['default']['ENGINE'] = 'django.db.backends.postgresql_psycopg2'
elif url.scheme == 'mysql':
@@ -89,6 +95,8 @@
)
MIDDLEWARE_CLASSES = (
+ 'django.middleware.cache.UpdateCacheMiddleware',
+ 'django.middleware.cache.FetchFromCacheMiddleware',
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
View
@@ -1,23 +1,21 @@
-name: gtd
-
+name: django-gtd
env:
DJANGO_SETTINGS_MODULE: settings
-
requirements:
pypm:
- psycopg2
- django
- south
-
+ pip:
+ - python-memcached
services:
postgresql-gtd: postgresql
-
+ memcached-gtd: memcached
hooks:
post-staging:
- python manage.py syncdb --noinput
- python manage.py migrate
- echo "Run 'stackato run python manage.py createsuperuser' to create an admin user"
-
ignores:
- .git
- dev.db

0 comments on commit 5090e42

Please sign in to comment.