diff --git a/cms/envs/bok_choy.env.json b/cms/envs/bok_choy.env.json index 5301b8ada84b..6343dc048c69 100644 --- a/cms/envs/bok_choy.env.json +++ b/cms/envs/bok_choy.env.json @@ -4,6 +4,11 @@ "CACHES": { "celery": { "BACKEND": "django.core.cache.backends.memcached.PyMemcacheCache", + "OPTIONS": { + "no_delay": true, + "ignore_exc": true, + "use_pooling": true + }, "KEY_FUNCTION": "common.djangoapps.util.memcache.safe_key", "KEY_PREFIX": "integration_celery", "LOCATION": [ @@ -12,6 +17,11 @@ }, "default": { "BACKEND": "django.core.cache.backends.memcached.PyMemcacheCache", + "OPTIONS": { + "no_delay": true, + "ignore_exc": true, + "use_pooling": true + }, "KEY_FUNCTION": "common.djangoapps.util.memcache.safe_key", "KEY_PREFIX": "sandbox_default", "LOCATION": [ @@ -20,6 +30,11 @@ }, "general": { "BACKEND": "django.core.cache.backends.memcached.PyMemcacheCache", + "OPTIONS": { + "no_delay": true, + "ignore_exc": true, + "use_pooling": true + }, "KEY_FUNCTION": "common.djangoapps.util.memcache.safe_key", "KEY_PREFIX": "sandbox_general", "LOCATION": [ @@ -28,6 +43,11 @@ }, "mongo_metadata_inheritance": { "BACKEND": "django.core.cache.backends.memcached.PyMemcacheCache", + "OPTIONS": { + "no_delay": true, + "ignore_exc": true, + "use_pooling": true + }, "KEY_FUNCTION": "common.djangoapps.util.memcache.safe_key", "KEY_PREFIX": "integration_mongo_metadata_inheritance", "LOCATION": [ @@ -36,6 +56,11 @@ }, "staticfiles": { "BACKEND": "django.core.cache.backends.memcached.PyMemcacheCache", + "OPTIONS": { + "no_delay": true, + "ignore_exc": true, + "use_pooling": true + }, "KEY_FUNCTION": "common.djangoapps.util.memcache.safe_key", "KEY_PREFIX": "integration_static_files", "LOCATION": [ diff --git a/cms/envs/bok_choy.yml b/cms/envs/bok_choy.yml index 705d1a472fe4..03bd022414b4 100644 --- a/cms/envs/bok_choy.yml +++ b/cms/envs/bok_choy.yml @@ -7,26 +7,46 @@ BULK_EMAIL_DEFAULT_FROM_EMAIL: no-reply@example.com CACHES: celery: BACKEND: django.core.cache.backends.memcached.PyMemcacheCache + OPTIONS: + ignore_exc: true + no_delay: true + use_pooling: true KEY_FUNCTION: common.djangoapps.util.memcache.safe_key KEY_PREFIX: integration_celery LOCATION: ['localhost:11211'] default: BACKEND: django.core.cache.backends.memcached.PyMemcacheCache + OPTIONS: + ignore_exc: true + no_delay: true + use_pooling: true KEY_FUNCTION: common.djangoapps.util.memcache.safe_key KEY_PREFIX: sandbox_default LOCATION: ['localhost:11211'] general: BACKEND: django.core.cache.backends.memcached.PyMemcacheCache + OPTIONS: + ignore_exc: true + no_delay: true + use_pooling: true KEY_FUNCTION: common.djangoapps.util.memcache.safe_key KEY_PREFIX: sandbox_general LOCATION: ['localhost:11211'] mongo_metadata_inheritance: BACKEND: django.core.cache.backends.memcached.PyMemcacheCache + OPTIONS: + ignore_exc: true + no_delay: true + use_pooling: true KEY_FUNCTION: common.djangoapps.util.memcache.safe_key KEY_PREFIX: integration_mongo_metadata_inheritance LOCATION: ['localhost:11211'] staticfiles: BACKEND: django.core.cache.backends.memcached.PyMemcacheCache + OPTIONS: + ignore_exc: true + no_delay: true + use_pooling: true KEY_FUNCTION: common.djangoapps.util.memcache.safe_key KEY_PREFIX: integration_static_files LOCATION: ['localhost:11211'] diff --git a/cms/envs/bok_choy_docker.env.json b/cms/envs/bok_choy_docker.env.json index d6b01a061e1d..47fed49f1a38 100644 --- a/cms/envs/bok_choy_docker.env.json +++ b/cms/envs/bok_choy_docker.env.json @@ -4,6 +4,11 @@ "CACHES": { "celery": { "BACKEND": "django.core.cache.backends.memcached.PyMemcacheCache", + "OPTIONS": { + "no_delay": true, + "ignore_exc": true, + "use_pooling": true + }, "KEY_FUNCTION": "common.djangoapps.util.memcache.safe_key", "KEY_PREFIX": "integration_celery", "LOCATION": [ @@ -12,6 +17,11 @@ }, "default": { "BACKEND": "django.core.cache.backends.memcached.PyMemcacheCache", + "OPTIONS": { + "no_delay": true, + "ignore_exc": true, + "use_pooling": true + }, "KEY_FUNCTION": "common.djangoapps.util.memcache.safe_key", "KEY_PREFIX": "sandbox_default", "LOCATION": [ @@ -20,6 +30,11 @@ }, "general": { "BACKEND": "django.core.cache.backends.memcached.PyMemcacheCache", + "OPTIONS": { + "no_delay": true, + "ignore_exc": true, + "use_pooling": true + }, "KEY_FUNCTION": "common.djangoapps.util.memcache.safe_key", "KEY_PREFIX": "sandbox_general", "LOCATION": [ @@ -28,6 +43,11 @@ }, "mongo_metadata_inheritance": { "BACKEND": "django.core.cache.backends.memcached.PyMemcacheCache", + "OPTIONS": { + "no_delay": true, + "ignore_exc": true, + "use_pooling": true + }, "KEY_FUNCTION": "common.djangoapps.util.memcache.safe_key", "KEY_PREFIX": "integration_mongo_metadata_inheritance", "LOCATION": [ @@ -36,6 +56,11 @@ }, "staticfiles": { "BACKEND": "django.core.cache.backends.memcached.PyMemcacheCache", + "OPTIONS": { + "no_delay": true, + "ignore_exc": true, + "use_pooling": true + }, "KEY_FUNCTION": "common.djangoapps.util.memcache.safe_key", "KEY_PREFIX": "integration_static_files", "LOCATION": [ diff --git a/cms/envs/bok_choy_docker.yml b/cms/envs/bok_choy_docker.yml index b5f0990b6e28..bc9727d7cdf9 100644 --- a/cms/envs/bok_choy_docker.yml +++ b/cms/envs/bok_choy_docker.yml @@ -7,26 +7,46 @@ BULK_EMAIL_DEFAULT_FROM_EMAIL: no-reply@example.com CACHES: celery: BACKEND: django.core.cache.backends.memcached.PyMemcacheCache + OPTIONS: + no_delay: true + ignore_exc: true + use_pooling: true KEY_FUNCTION: common.djangoapps.util.memcache.safe_key KEY_PREFIX: integration_celery LOCATION: ['edx.devstack.memcached:11211'] default: BACKEND: django.core.cache.backends.memcached.PyMemcacheCache + OPTIONS: + no_delay: true + ignore_exc: true + use_pooling: true KEY_FUNCTION: common.djangoapps.util.memcache.safe_key KEY_PREFIX: sandbox_default LOCATION: ['edx.devstack.memcached:11211'] general: BACKEND: django.core.cache.backends.memcached.PyMemcacheCache + OPTIONS: + no_delay: true + ignore_exc: true + use_pooling: true KEY_FUNCTION: common.djangoapps.util.memcache.safe_key KEY_PREFIX: sandbox_general LOCATION: ['edx.devstack.memcached:11211'] mongo_metadata_inheritance: BACKEND: django.core.cache.backends.memcached.PyMemcacheCache + OPTIONS: + no_delay: true + ignore_exc: true + use_pooling: true KEY_FUNCTION: common.djangoapps.util.memcache.safe_key KEY_PREFIX: integration_mongo_metadata_inheritance LOCATION: ['edx.devstack.memcached:11211'] staticfiles: BACKEND: django.core.cache.backends.memcached.PyMemcacheCache + OPTIONS: + no_delay: true + ignore_exc: true + use_pooling: true KEY_FUNCTION: common.djangoapps.util.memcache.safe_key KEY_PREFIX: integration_static_files LOCATION: ['edx.devstack.memcached:11211'] diff --git a/cms/envs/common.py b/cms/envs/common.py index 0aab8cb0e288..28f9969436ba 100644 --- a/cms/envs/common.py +++ b/cms/envs/common.py @@ -2171,6 +2171,11 @@ 'LOCATION': ['localhost:11211'], 'TIMEOUT': '86400', # This data should be long-lived for performance, BundleCache handles invalidation 'BACKEND': 'django.core.cache.backends.memcached.PyMemcacheCache', + 'OPTIONS': { + 'no_delay': True, + 'ignore_exc': True, + 'use_pooling': True, + } }, 'course_structure_cache': { 'KEY_PREFIX': 'course_structure', @@ -2178,6 +2183,11 @@ 'LOCATION': ['localhost:11211'], 'TIMEOUT': '7200', 'BACKEND': 'django.core.cache.backends.memcached.PyMemcacheCache', + 'OPTIONS': { + 'no_delay': True, + 'ignore_exc': True, + 'use_pooling': True, + } }, 'celery': { 'KEY_PREFIX': 'celery', @@ -2185,6 +2195,11 @@ 'LOCATION': ['localhost:11211'], 'TIMEOUT': '7200', 'BACKEND': 'django.core.cache.backends.memcached.PyMemcacheCache', + 'OPTIONS': { + 'no_delay': True, + 'ignore_exc': True, + 'use_pooling': True, + } }, 'mongo_metadata_inheritance': { 'KEY_PREFIX': 'mongo_metadata_inheritance', @@ -2192,12 +2207,22 @@ 'LOCATION': ['localhost:11211'], 'TIMEOUT': 300, 'BACKEND': 'django.core.cache.backends.memcached.PyMemcacheCache', + 'OPTIONS': { + 'no_delay': True, + 'ignore_exc': True, + 'use_pooling': True, + } }, 'staticfiles': { 'KEY_FUNCTION': 'common.djangoapps.util.memcache.safe_key', 'LOCATION': ['localhost:11211'], 'KEY_PREFIX': 'staticfiles_general', 'BACKEND': 'django.core.cache.backends.memcached.PyMemcacheCache', + 'OPTIONS': { + 'no_delay': True, + 'ignore_exc': True, + 'use_pooling': True, + } }, 'default': { 'VERSION': '1', @@ -2205,18 +2230,33 @@ 'LOCATION': ['localhost:11211'], 'KEY_PREFIX': 'default', 'BACKEND': 'django.core.cache.backends.memcached.PyMemcacheCache', + 'OPTIONS': { + 'no_delay': True, + 'ignore_exc': True, + 'use_pooling': True, + } }, 'configuration': { 'KEY_FUNCTION': 'common.djangoapps.util.memcache.safe_key', 'LOCATION': ['localhost:11211'], 'KEY_PREFIX': 'configuration', 'BACKEND': 'django.core.cache.backends.memcached.PyMemcacheCache', + 'OPTIONS': { + 'no_delay': True, + 'ignore_exc': True, + 'use_pooling': True, + } }, 'general': { 'KEY_FUNCTION': 'common.djangoapps.util.memcache.safe_key', 'LOCATION': ['localhost:11211'], 'KEY_PREFIX': 'general', 'BACKEND': 'django.core.cache.backends.memcached.PyMemcacheCache', + 'OPTIONS': { + 'no_delay': True, + 'ignore_exc': True, + 'use_pooling': True, + } }, } diff --git a/cms/envs/devstack-experimental.yml b/cms/envs/devstack-experimental.yml index 67356ad4b3f8..26311bf0fb66 100644 --- a/cms/envs/devstack-experimental.yml +++ b/cms/envs/devstack-experimental.yml @@ -54,6 +54,10 @@ BULK_EMAIL_LOG_SENT_EMAILS: false CACHES: celery: BACKEND: django.core.cache.backends.memcached.PyMemcacheCache + OPTIONS: + no_delay: true + ignore_exc: true + use_pooling: true KEY_FUNCTION: common.djangoapps.util.memcache.safe_key KEY_PREFIX: celery LOCATION: @@ -61,12 +65,20 @@ CACHES: TIMEOUT: '7200' configuration: BACKEND: django.core.cache.backends.memcached.PyMemcacheCache + OPTIONS: + no_delay: true + ignore_exc: true + use_pooling: true KEY_FUNCTION: common.djangoapps.util.memcache.safe_key KEY_PREFIX: 78f87108afce LOCATION: - edx.devstack.memcached:11211 course_structure_cache: BACKEND: django.core.cache.backends.memcached.PyMemcacheCache + OPTIONS: + no_delay: true + ignore_exc: true + use_pooling: true KEY_FUNCTION: common.djangoapps.util.memcache.safe_key KEY_PREFIX: course_structure LOCATION: @@ -74,6 +86,10 @@ CACHES: TIMEOUT: '7200' default: BACKEND: django.core.cache.backends.memcached.PyMemcacheCache + OPTIONS: + ignore_exc: true + no_delay: true + use_pooling: true KEY_FUNCTION: common.djangoapps.util.memcache.safe_key KEY_PREFIX: default LOCATION: @@ -81,12 +97,20 @@ CACHES: VERSION: '1' general: BACKEND: django.core.cache.backends.memcached.PyMemcacheCache + OPTIONS: + no_delay: true + ignore_exc: true + use_pooling: true KEY_FUNCTION: common.djangoapps.util.memcache.safe_key KEY_PREFIX: general LOCATION: - edx.devstack.memcached:11211 mongo_metadata_inheritance: BACKEND: django.core.cache.backends.memcached.PyMemcacheCache + OPTIONS: + no_delay: true + ignore_exc: true + use_pooling: true KEY_FUNCTION: common.djangoapps.util.memcache.safe_key KEY_PREFIX: mongo_metadata_inheritance LOCATION: @@ -94,6 +118,10 @@ CACHES: TIMEOUT: 300 staticfiles: BACKEND: django.core.cache.backends.memcached.PyMemcacheCache + OPTIONS: + no_delay: true + ignore_exc: true + use_pooling: true KEY_FUNCTION: common.djangoapps.util.memcache.safe_key KEY_PREFIX: 78f87108afce_general LOCATION: diff --git a/lms/envs/bok_choy.yml b/lms/envs/bok_choy.yml index 8379bf20e963..0468867eb74b 100644 --- a/lms/envs/bok_choy.yml +++ b/lms/envs/bok_choy.yml @@ -20,26 +20,46 @@ BLOCK_STRUCTURES_SETTINGS: CACHES: celery: BACKEND: django.core.cache.backends.memcached.PyMemcacheCache + OPTIONS: + no_delay: true + ignore_exc: true + use_pooling: true KEY_FUNCTION: common.djangoapps.util.memcache.safe_key KEY_PREFIX: integration_celery LOCATION: ['localhost:11211'] default: BACKEND: django.core.cache.backends.memcached.PyMemcacheCache + OPTIONS: + no_delay: true + ignore_exc: true + use_pooling: true KEY_FUNCTION: common.djangoapps.util.memcache.safe_key KEY_PREFIX: sandbox_default LOCATION: ['localhost:11211'] general: BACKEND: django.core.cache.backends.memcached.PyMemcacheCache + OPTIONS: + no_delay: true + ignore_exc: true + use_pooling: true KEY_FUNCTION: common.djangoapps.util.memcache.safe_key KEY_PREFIX: sandbox_general LOCATION: ['localhost:11211'] mongo_metadata_inheritance: BACKEND: django.core.cache.backends.memcached.PyMemcacheCache + OPTIONS: + no_delay: true + ignore_exc: true + use_pooling: true KEY_FUNCTION: common.djangoapps.util.memcache.safe_key KEY_PREFIX: integration_mongo_metadata_inheritance LOCATION: ['localhost:11211'] staticfiles: BACKEND: django.core.cache.backends.memcached.PyMemcacheCache + OPTIONS: + no_delay: true + ignore_exc: true + use_pooling: true KEY_FUNCTION: common.djangoapps.util.memcache.safe_key KEY_PREFIX: integration_static_files LOCATION: ['localhost:11211'] diff --git a/lms/envs/bok_choy_docker.yml b/lms/envs/bok_choy_docker.yml index 83c830172f21..afef10bb5d2c 100644 --- a/lms/envs/bok_choy_docker.yml +++ b/lms/envs/bok_choy_docker.yml @@ -12,26 +12,46 @@ CACHES: KEY_FUNCTION: common.djangoapps.util.memcache.safe_key KEY_PREFIX: integration_celery LOCATION: ['edx.devstack.memcached:11211'] + OPTIONS: + no_delay: true + ignore_exc: true + use_pooling: true default: BACKEND: django.core.cache.backends.memcached.PyMemcacheCache KEY_FUNCTION: common.djangoapps.util.memcache.safe_key KEY_PREFIX: sandbox_default LOCATION: ['edx.devstack.memcached:11211'] + OPTIONS: + no_delay: true + ignore_exc: true + use_pooling: true general: BACKEND: django.core.cache.backends.memcached.PyMemcacheCache KEY_FUNCTION: common.djangoapps.util.memcache.safe_key KEY_PREFIX: sandbox_general LOCATION: ['edx.devstack.memcached:11211'] + OPTIONS: + no_delay: true + ignore_exc: true + use_pooling: true mongo_metadata_inheritance: BACKEND: django.core.cache.backends.memcached.PyMemcacheCache KEY_FUNCTION: common.djangoapps.util.memcache.safe_key KEY_PREFIX: integration_mongo_metadata_inheritance LOCATION: ['edx.devstack.memcached:11211'] + OPTIONS: + no_delay: true + ignore_exc: true + use_pooling: true staticfiles: BACKEND: django.core.cache.backends.memcached.PyMemcacheCache KEY_FUNCTION: common.djangoapps.util.memcache.safe_key KEY_PREFIX: integration_static_files LOCATION: ['edx.devstack.memcached:11211'] + OPTIONS: + no_delay: true + ignore_exc: true + use_pooling: true CELERY_BROKER_HOSTNAME: localhost CELERY_BROKER_PASSWORD: celery CELERY_BROKER_TRANSPORT: amqp diff --git a/lms/envs/common.py b/lms/envs/common.py index 990e137754fd..7b92e2359487 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -1114,6 +1114,11 @@ 'LOCATION': ['localhost:11211'], 'TIMEOUT': '86400', # This data should be long-lived for performance, BundleCache handles invalidation 'BACKEND': 'django.core.cache.backends.memcached.PyMemcacheCache', + 'OPTIONS': { + 'no_delay': True, + 'ignore_exc': True, + 'use_pooling': True, + } }, 'course_structure_cache': { 'KEY_PREFIX': 'course_structure', @@ -1121,6 +1126,11 @@ 'LOCATION': ['localhost:11211'], 'TIMEOUT': '7200', 'BACKEND': 'django.core.cache.backends.memcached.PyMemcacheCache', + 'OPTIONS': { + 'no_delay': True, + 'ignore_exc': True, + 'use_pooling': True, + } }, 'celery': { 'KEY_PREFIX': 'celery', @@ -1128,6 +1138,11 @@ 'LOCATION': ['localhost:11211'], 'TIMEOUT': '7200', 'BACKEND': 'django.core.cache.backends.memcached.PyMemcacheCache', + 'OPTIONS': { + 'no_delay': True, + 'ignore_exc': True, + 'use_pooling': True, + } }, 'mongo_metadata_inheritance': { 'KEY_PREFIX': 'mongo_metadata_inheritance', @@ -1135,12 +1150,22 @@ 'LOCATION': ['localhost:11211'], 'TIMEOUT': 300, 'BACKEND': 'django.core.cache.backends.memcached.PyMemcacheCache', + 'OPTIONS': { + 'no_delay': True, + 'ignore_exc': True, + 'use_pooling': True, + } }, 'staticfiles': { 'KEY_FUNCTION': 'common.djangoapps.util.memcache.safe_key', 'LOCATION': ['localhost:11211'], 'KEY_PREFIX': 'staticfiles_general', 'BACKEND': 'django.core.cache.backends.memcached.PyMemcacheCache', + 'OPTIONS': { + 'no_delay': True, + 'ignore_exc': True, + 'use_pooling': True, + } }, 'default': { 'VERSION': '1', @@ -1148,18 +1173,33 @@ 'LOCATION': ['localhost:11211'], 'KEY_PREFIX': 'default', 'BACKEND': 'django.core.cache.backends.memcached.PyMemcacheCache', + 'OPTIONS': { + 'no_delay': True, + 'ignore_exc': True, + 'use_pooling': True, + } }, 'configuration': { 'KEY_FUNCTION': 'common.djangoapps.util.memcache.safe_key', 'LOCATION': ['localhost:11211'], 'KEY_PREFIX': 'configuration', 'BACKEND': 'django.core.cache.backends.memcached.PyMemcacheCache', + 'OPTIONS': { + 'no_delay': True, + 'ignore_exc': True, + 'use_pooling': True, + } }, 'general': { 'KEY_FUNCTION': 'common.djangoapps.util.memcache.safe_key', 'LOCATION': ['localhost:11211'], 'KEY_PREFIX': 'general', 'BACKEND': 'django.core.cache.backends.memcached.PyMemcacheCache', + 'OPTIONS': { + 'no_delay': True, + 'ignore_exc': True, + 'use_pooling': True, + } }, } diff --git a/lms/envs/devstack-experimental.yml b/lms/envs/devstack-experimental.yml index 328318f53570..96b8952c822e 100644 --- a/lms/envs/devstack-experimental.yml +++ b/lms/envs/devstack-experimental.yml @@ -73,6 +73,10 @@ BULK_EMAIL_ROUTING_KEY_SMALL_JOBS: edx.lms.core.default CACHES: celery: BACKEND: django.core.cache.backends.memcached.PyMemcacheCache + OPTIONS: + no_delay: true + ignore_exc: true + use_pooling: true KEY_FUNCTION: common.djangoapps.util.memcache.safe_key KEY_PREFIX: celery LOCATION: @@ -80,12 +84,20 @@ CACHES: TIMEOUT: '7200' configuration: BACKEND: django.core.cache.backends.memcached.PyMemcacheCache + OPTIONS: + no_delay: true + ignore_exc: true + use_pooling: true KEY_FUNCTION: common.djangoapps.util.memcache.safe_key KEY_PREFIX: 78f87108afce LOCATION: - edx.devstack.memcached:11211 course_structure_cache: BACKEND: django.core.cache.backends.memcached.PyMemcacheCache + OPTIONS: + no_delay: true + ignore_exc: true + use_pooling: true KEY_FUNCTION: common.djangoapps.util.memcache.safe_key KEY_PREFIX: course_structure LOCATION: @@ -93,6 +105,10 @@ CACHES: TIMEOUT: '7200' default: BACKEND: django.core.cache.backends.memcached.PyMemcacheCache + OPTIONS: + no_delay: true + ignore_exc: true + use_pooling: true KEY_FUNCTION: common.djangoapps.util.memcache.safe_key KEY_PREFIX: default LOCATION: @@ -100,12 +116,20 @@ CACHES: VERSION: '1' general: BACKEND: django.core.cache.backends.memcached.PyMemcacheCache + OPTIONS: + no_delay: true + ignore_exc: true + use_pooling: true KEY_FUNCTION: common.djangoapps.util.memcache.safe_key KEY_PREFIX: general LOCATION: - edx.devstack.memcached:11211 mongo_metadata_inheritance: BACKEND: django.core.cache.backends.memcached.PyMemcacheCache + OPTIONS: + no_delay: true + ignore_exc: true + use_pooling: true KEY_FUNCTION: common.djangoapps.util.memcache.safe_key KEY_PREFIX: mongo_metadata_inheritance LOCATION: @@ -113,6 +137,10 @@ CACHES: TIMEOUT: 300 staticfiles: BACKEND: django.core.cache.backends.memcached.PyMemcacheCache + OPTIONS: + no_delay: true + ignore_exc: true + use_pooling: true KEY_FUNCTION: common.djangoapps.util.memcache.safe_key KEY_PREFIX: 78f87108afce_general LOCATION: