X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/c26ab6ee15974c1133a6d08c459b51199185f25f..e9f9c3887d9c9e45401257a78d3182f17a5a8146:/wolnelektury/settings/cache.py diff --git a/wolnelektury/settings/cache.py b/wolnelektury/settings/cache.py index cc9024063..a9cc70f3b 100644 --- a/wolnelektury/settings/cache.py +++ b/wolnelektury/settings/cache.py @@ -1,6 +1,3 @@ -from os import path -from settings.paths import PROJECT_DIR - CACHES = { 'default': { 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache', @@ -8,19 +5,14 @@ CACHES = { '127.0.0.1:11211', ] }, - 'permanent': { + 'ssify': { 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache', - 'TIMEOUT': 2419200, + 'TIMEOUT': None, + 'KEY_PREFIX': 'ssify', 'LOCATION': [ '127.0.0.1:11211', - ] - }, - 'api': { - 'BACKEND': 'django.core.cache.backends.filebased.FileBasedCache', - 'LOCATION': path.join(PROJECT_DIR, '../django_cache/'), - 'KEY_PREFIX': 'api', - 'TIMEOUT': 86400, + ], }, } -CACHE_MIDDLEWARE_ANONYMOUS_ONLY=True -SEARCH_INDEX = path.join(PROJECT_DIR, '../search_index/') + +CACHE_MIDDLEWARE_SECONDS = 24 * 60 * 60