Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Revert cache settings
Marcin Gębala24d004b11885
diff --git a/.isort.cfg b/.isort.cfgindex 0c968f353d..42a876e47e 100644--- a/.isort.cfg+++ b/.isort.cfg@@ -1,2 +1,2 @@[settings]-known_third_party = PIL,babel,braintree,celery,dj_database_url,dj_email_url,django,django_countries,django_filters,django_measurement,django_prices,django_prices_openexchangerates,django_prices_vatlayer,draftjs_sanitizer,faker,freezegun,geolite2,google_measurement_protocol,graphene,graphene_django,graphene_federation,graphql,graphql_jwt,graphql_relay,html_to_draftjs,i18naddress,jaeger_client,jwt,markdown,measurement,mptt,oauthlib,opentracing,phonenumber_field,phonenumbers,prices,promise,pytest,pytz,razorpay,requests,sentry_sdk,storages,stripe,templated_email,text_unidecode,tqdm,versatileimagefield+known_third_party = PIL,babel,braintree,celery,dj_database_url,dj_email_url,django,django_cache_url,django_countries,django_filters,django_measurement,django_prices,django_prices_openexchangerates,django_prices_vatlayer,draftjs_sanitizer,faker,freezegun,geolite2,google_measurement_protocol,graphene,graphene_django,graphene_federation,graphql,graphql_jwt,graphql_relay,html_to_draftjs,i18naddress,jaeger_client,jwt,markdown,measurement,mptt,oauthlib,opentracing,phonenumber_field,phonenumbers,prices,promise,pytest,pytz,razorpay,requests,sentry_sdk,storages,stripe,templated_email,text_unidecode,tqdm,versatileimagefielddiff --git a/poetry.lock b/poetry.lockindex 183f9c66ad..9c819b0bfa 100644--- a/poetry.lock+++ b/poetry.lock@@ -430,6 +430,14 @@ version = "1.0.4"[package.dependencies]django = "*"+[[package]]+category = "main"+description = "Use Cache URLs in your Django application."+name = "django-cache-url"+optional = false+python-versions = "*"+version = "3.1.2"+[[package]]category = "main"description = "Provides a country field for Django models."@@ -2161,7 +2169,7 @@ idna = ">=2.0"multidict = ">=4.0"[metadata]-content-hash = "66e858025822562713f9a69c78691c7edb9a4f9b1c0ec6c31936ce5b78661417"+content-hash = "40f4033bbc05c8617b6510c6a70fc82eeb9869788c90058c9f4f7ee68638a108"python-versions = "~3.8"[metadata.files]@@ -2359,6 +2367,10 @@ django-appconf = [{file = "django-appconf-1.0.4.tar.gz", hash = "sha256:be58deb54a43d77d2e1621fe59f787681376d3cd0b8bd8e4758ef6c3a6453380"},{file = "django_appconf-1.0.4-py2.py3-none-any.whl", hash = "sha256:1b1d0e1069c843ebe8ae5aa48ec52403b1440402b320c3e3a206a0907e97bb06"},]+django-cache-url = [+ {file = "django-cache-url-3.1.2.tar.gz", hash = "sha256:d0ee0d6c5daab92787bff47a4a6f5a6cf97c3c80d81a990820b2af16e12ad65a"},+ {file = "django_cache_url-3.1.2-py2.py3-none-any.whl", hash = "sha256:889ac5d56105bdf44c0fd8f82c024119e198baf0bf698fdf49b1d5de92d8d4bb"},+]django-countries = [{file = "django-countries-6.1.2.tar.gz", hash = "sha256:e2ae9b76f9a0b5f3f365b5b81fe4972df0a5878c930139586f43f7d6d50a9594"},{file = "django_countries-6.1.2-py3-none-any.whl", hash = "sha256:2e852c9693818d64d28758a720a0cb8277673ac495af8b855c4dc64940703bd2"},diff --git a/pyproject.toml b/pyproject.tomlindex 4141a0ab54..d7203349ba 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -60,6 +60,7 @@ uwsgi = {version = "^2.0.8", platform = "!=win32"}weasyprint = ">=48"oauthlib = "^3.0"jaeger-client = "^4.3.0"+django-cache-url = "^3.1.2"[tool.poetry.dev-dependencies]black = "19.10b0"diff --git a/requirements.txt b/requirements.txtindex e675ce27ae..4552e31db6 100644--- a/requirements.txt+++ b/requirements.txt@@ -20,6 +20,7 @@ dj-database-url==0.5.0dj-email-url==1.0.0django==3.0.6django-appconf==1.0.4+django-cache-url==3.1.2django-countries==6.1.2django-filter==2.2.0django-graphql-jwt==0.3.0diff --git a/requirements_dev.txt b/requirements_dev.txtindex 55eeb0e1f0..4e184b1940 100644--- a/requirements_dev.txt+++ b/requirements_dev.txt@@ -33,6 +33,7 @@ dj-database-url==0.5.0dj-email-url==1.0.0django==3.0.6django-appconf==1.0.4+django-cache-url==3.1.2django-countries==6.1.2django-debug-toolbar==2.2django-debug-toolbar-request-history==0.1.1diff --git a/saleor/settings.py b/saleor/settings.pyindex 35a7e1b989..653949c318 100644--- a/saleor/settings.py+++ b/saleor/settings.py@@ -5,6 +5,7 @@ from datetime import timedeltaimport dj_database_urlimport dj_email_url+import django_cache_urlimport jaeger_clientimport jaeger_client.configimport sentry_sdk@@ -546,3 +547,10 @@ if "JAEGER_AGENT_HOST" in os.environ:service_name="saleor",validate=True,).initialize_tracer()+++# Some cloud providers (Heroku) export REDIS_URL variable instead of CACHE_URL+REDIS_URL = os.environ.get("REDIS_URL")+if REDIS_URL:+ CACHE_URL = os.environ.setdefault("CACHE_URL", REDIS_URL)+CACHES = {"default": django_cache_url.config()}