|
|
|
@ -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' |
|
|
|
|
|
|
|
|
|