diff --git a/lore/settings.py b/lore/settings.py index 38de21b2..dc668029 100644 --- a/lore/settings.py +++ b/lore/settings.py @@ -173,7 +173,10 @@ def get_var(name, default): "lore_indexing": { "BACKEND": "django.core.cache.backends.locmem.LocMemCache", "TIMEOUT": get_var("LORE_INDEXING_CACHE_TIMEOUT", "60"), - } + }, + "compressor": { + "BACKEND": "django.core.cache.backends.locmem.LocMemCache", + }, } # Internationalization @@ -215,6 +218,8 @@ def get_var(name, default): ) COMPRESS_OFFLINE = get_var('LORE_COMPRESS_OFFLINE', False) COMPRESS_ENABLED = get_var('LORE_COMPRESS_ENABLED', not DEBUG) +COMPRESS_CACHEABLE_PRECOMPILERS = ('text/jsx',) +COMPRESS_CACHE_BACKEND = 'compressor' # Media and storage settings IMPORT_PATH_PREFIX = get_var('LORE_IMPORT_PATH_PREFIX', 'course_archives/') diff --git a/requirements.txt b/requirements.txt index 65d88c4a..94e549c7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,7 +3,10 @@ celery==3.1.18 Django==1.8.5 django-appconf==1.0.1 django-bootstrap3==6.2.2 -django-compressor==1.5 + +# Pin to develop branch for cache feature +git+https://github.com/django-compressor/django-compressor@5086fddb60d00ccb71a8883d4d0b40c6630d38e7#egg=django-compressor-dev==1.5-odl + django-debug-toolbar==1.3.2 django-elasticsearch-debug-toolbar==0.1.15 djangorestframework==3.2.2