From: Radek Czajka Date: Tue, 22 Feb 2011 11:42:47 +0000 (+0100) Subject: turn on memcached X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/f29f5f2c7e1714ee720f6aa84c066d62a0ad9826?ds=inline turn on memcached --- diff --git a/requirements.txt b/requirements.txt index 0139514b6..cd1467fae 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,6 +7,8 @@ django-pagination>=1.0 django-rosetta>=0.5.3 django-maintenancemode>=0.9 +python-memcached + # Feedparser Feedparser>=4.1 diff --git a/wolnelektury/settings.py b/wolnelektury/settings.py index a50763dcc..e85f1893f 100644 --- a/wolnelektury/settings.py +++ b/wolnelektury/settings.py @@ -91,14 +91,16 @@ TEMPLATE_CONTEXT_PROCESSORS = [ ] MIDDLEWARE_CLASSES = [ + 'django.middleware.cache.UpdateCacheMiddleware', 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.middleware.doc.XViewMiddleware', 'pagination.middleware.PaginationMiddleware', 'django.middleware.locale.LocaleMiddleware', - 'maintenancemode.middleware.MaintenanceModeMiddleware', + 'django.middleware.common.CommonMiddleware', + 'django.middleware.cache.FetchFromCacheMiddleware', ] ROOT_URLCONF = 'wolnelektury.urls' @@ -141,7 +143,9 @@ INSTALLED_APPS = [ 'pdcounter', ] -CACHE_BACKEND = 'locmem:///?max_entries=3000' +#CACHE_BACKEND = 'locmem:///?max_entries=3000' +CACHE_BACKEND = 'memcached://127.0.0.1:11211/' +CACHE_MIDDLEWARE_ANONYMOUS_ONLY=True # CSS and JavaScript file groups COMPRESS_CSS = {