mirror of
https://github.com/lemeow125/DRF_Template.git
synced 2025-09-18 05:29:37 +08:00
Reimplement caching
This commit is contained in:
parent
bae2cc653e
commit
d99c82bef4
7 changed files with 89 additions and 5 deletions
|
@ -242,8 +242,21 @@ SPECTACULAR_SETTINGS = {
|
|||
"SERVE_INCLUDE_SCHEMA": False,
|
||||
}
|
||||
|
||||
|
||||
# Pygraphviz
|
||||
GRAPH_MODELS = {
|
||||
"all_applications": True,
|
||||
"group_models": True,
|
||||
}
|
||||
|
||||
|
||||
# Caching
|
||||
CACHES = {
|
||||
"default": {
|
||||
"BACKEND": "django_redis.cache.RedisCache",
|
||||
"LOCATION": f"redis://{config.CACHE_USERNAME}:{config.CACHE_PASSWORD}@{config.CACHE_HOST}:{config.CACHE_PORT}/1",
|
||||
"OPTIONS": {
|
||||
"CLIENT_CLASS": "django_redis.client.DefaultClient",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue