From face1c830102c52bdca9f0a880ce2ac7020527a8 Mon Sep 17 00:00:00 2001 From: RogerWork Date: Thu, 7 Sep 2023 10:00:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=B4=E6=97=B6=E4=BF=AE=E6=94=B9=E7=BC=93?= =?UTF-8?q?=E5=AD=98=E6=9C=BA=E5=88=B6=EF=BC=8C=E9=98=B2=E6=AD=A2=E5=90=AF?= =?UTF-8?q?=E5=8A=A8=E6=97=B6=E5=8D=A1=E5=9C=A8Performing=20system=20check?= =?UTF-8?q?s...?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- myshop_back/settings.py | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/myshop_back/settings.py b/myshop_back/settings.py index ec02bee..7e2758c 100644 --- a/myshop_back/settings.py +++ b/myshop_back/settings.py @@ -184,24 +184,24 @@ REST_FRAMEWORK = { CORS_ALLOW_CREDENTIALS = True # 跨域时是否携带cookie CORS_ORIGIN_ALLOW_ALL = True # 指定所有域名都可以访问后端接口 -# CACHES = { -# 'default': { -# 'BACKEND': 'django.core.cache.backends.db.DatabaseCache', -# 'LOCATION': 'my_cache_table', -# } -# } - CACHES = { 'default': { - 'BACKEND': 'django_redis.cache.RedisCache', - 'LOCATION': 'redis://home.rogersun.cn:6379', - 'OPTIONS': { - 'CLIENT_CLASS': 'django_redis.client.DefaultClient', - 'PASSWORD': 'Sxzgx1209', - } + 'BACKEND': 'django.core.cache.backends.db.DatabaseCache', + 'LOCATION': 'my_cache_table', } } +# CACHES = { +# 'default': { +# 'BACKEND': 'django_redis.cache.RedisCache', +# 'LOCATION': 'redis://home.rogersun.cn:6379', +# 'OPTIONS': { +# 'CLIENT_CLASS': 'django_redis.client.DefaultClient', +# 'PASSWORD': 'Sxzgx1209', +# } +# } +# } + SESSION_ENGINE = 'django.contrib.sessions.backends.cached_db' SESSION_CACHE_ALIAS = 'default'