diff --git a/config/cms/docker_run_production.py b/config/cms/docker_run_production.py index 24f9676c..817a1703 100644 --- a/config/cms/docker_run_production.py +++ b/config/cms/docker_run_production.py @@ -146,9 +146,13 @@ CACHES = config( "CACHES", default={ - "default": { + "loc_cache": { "BACKEND": "django.core.cache.backends.locmem.LocMemCache", - "LOCATION": "unique-snowflake", + "LOCATION": "edx_location_mem_cache", + }, + "default": { + "BACKEND": "django.core.cache.backends.memcached.MemcachedCache", + "LOCATION": "memcached:11211", } }, formatter=json.loads, diff --git a/config/lms/docker_run_production.py b/config/lms/docker_run_production.py index e5c88e87..5473db16 100644 --- a/config/lms/docker_run_production.py +++ b/config/lms/docker_run_production.py @@ -225,22 +225,18 @@ CACHES = config( "CACHES", default={ - "default": { + "loc_cache": { "BACKEND": "django.core.cache.backends.locmem.LocMemCache", - "LOCATION": "unique-snowflake", + "LOCATION": "edx_location_mem_cache", + }, + "default": { + "BACKEND": "django.core.cache.backends.memcached.MemcachedCache", + "LOCATION": "memcached:11211", } }, formatter=json.loads, ) -# Cache used for location mapping -- called many times with the same key/value -# in a given request. -if "loc_cache" not in CACHES: - CACHES["loc_cache"] = { - "BACKEND": "django.core.cache.backends.locmem.LocMemCache", - "LOCATION": "edx_location_mem_cache", - } - # Email overrides DEFAULT_FROM_EMAIL = config("DEFAULT_FROM_EMAIL", default=DEFAULT_FROM_EMAIL) DEFAULT_FEEDBACK_EMAIL = config(