From 212b03e2aac9312b97c7377967155b46b3dbbe63 Mon Sep 17 00:00:00 2001 From: Muhammad Soban Javed <58461728+iamsobanjaved@users.noreply.github.com> Date: Mon, 16 Oct 2023 19:38:47 +0500 Subject: [PATCH] fix: replace MemcachedCache with PyMemcacheCache (#1210) Co-authored-by: Muhammad Soban Javed --- configuration_files/analytics_api.yml | 6 +++++- configuration_files/discovery.yml | 6 +++++- configuration_files/insights.yml | 6 +++++- configuration_files/registrar.yml | 6 +++++- 4 files changed, 20 insertions(+), 4 deletions(-) diff --git a/configuration_files/analytics_api.yml b/configuration_files/analytics_api.yml index 927073e1d8..e2724652ae 100644 --- a/configuration_files/analytics_api.yml +++ b/configuration_files/analytics_api.yml @@ -7,10 +7,14 @@ BACKEND_SERVICE_EDX_OAUTH2_PROVIDER_URL: http://127.0.0.1:8000/oauth2 BACKEND_SERVICE_EDX_OAUTH2_SECRET: analytics_api-backend-service-secret CACHES: default: - BACKEND: django.core.cache.backends.memcached.MemcachedCache + BACKEND: django.core.cache.backends.memcached.PyMemcacheCache KEY_PREFIX: analytics_api LOCATION: - memcache + OPTIONS: + no_delay: true + ignore_exc: true + use_pooling: true CSRF_COOKIE_SECURE: false DATABASES: default: diff --git a/configuration_files/discovery.yml b/configuration_files/discovery.yml index 9493762bbf..97d572b607 100644 --- a/configuration_files/discovery.yml +++ b/configuration_files/discovery.yml @@ -9,10 +9,14 @@ BACKEND_SERVICE_EDX_OAUTH2_PROVIDER_URL: http://localhost:18000/oauth2 BACKEND_SERVICE_EDX_OAUTH2_SECRET: discovery-backend-service-secret CACHES: default: - BACKEND: django.core.cache.backends.memcached.MemcachedCache + BACKEND: django.core.cache.backends.memcached.PyMemcacheCache KEY_PREFIX: discovery LOCATION: - edx.devstack.memcached:11211 + OPTIONS: + no_delay: true + ignore_exc: true + use_pooling: true CELERY_BROKER_URL: redis://:password@edx.devstack.redis:6379/ CORS_ORIGIN_WHITELIST: [] CSRF_COOKIE_SECURE: false diff --git a/configuration_files/insights.yml b/configuration_files/insights.yml index fbacce67a6..8f903ca8ad 100644 --- a/configuration_files/insights.yml +++ b/configuration_files/insights.yml @@ -4,10 +4,14 @@ APPLICATION_NAME: Insights BACKEND_SERVICE_EDX_OAUTH2_PROVIDER_URL: http://edx.devstack.lms:18000/oauth2 CACHES: default: - BACKEND: django.core.cache.backends.memcached.MemcachedCache + BACKEND: django.core.cache.backends.memcached.PyMemcacheCache KEY_PREFIX: default_env-default_deployment-insights LOCATION: - edx.devstack.memcached:11211 + OPTIONS: + no_delay: true + ignore_exc: true + use_pooling: true CDN_DOMAIN: null CMS_COURSE_SHORTCUT_BASE_URL: http://edx.devstack.lms:18000/course COURSE_API_URL: http://edx.devstack.lms:18000/api/courses/v1/ diff --git a/configuration_files/registrar.yml b/configuration_files/registrar.yml index 3f30b2b897..5fba81b083 100644 --- a/configuration_files/registrar.yml +++ b/configuration_files/registrar.yml @@ -4,10 +4,14 @@ BACKEND_SERVICE_EDX_OAUTH2_PROVIDER_URL: http://localhost:18000/oauth2 BACKEND_SERVICE_EDX_OAUTH2_SECRET: registrar-backend-service-secret CACHES: default: - BACKEND: django.core.cache.backends.memcached.MemcachedCache + BACKEND: django.core.cache.backends.memcached.PyMemcacheCache KEY_PREFIX: registrar LOCATION: - edx.devstack.memcached:11211 + OPTIONS: + no_delay: true + ignore_exc: true + use_pooling: true CELERY_ALWAYS_EAGER: false CELERY_BROKER_HOSTNAME: '' CELERY_BROKER_PASSWORD: ''