install all packages and configurate
This commit is contained in:
24
config/conf/redis.py
Normal file
24
config/conf/redis.py
Normal file
@@ -0,0 +1,24 @@
|
||||
CACHES = {
|
||||
"default": {
|
||||
"BACKEND": 'django_redis.cache.RedisCache',
|
||||
"LOCATION": 'redis://127.0.0.1:6379/1',
|
||||
"TIMEOUT": 5,
|
||||
},
|
||||
}
|
||||
|
||||
CACHE_MIDDLEWARE_SECONDS = 5
|
||||
|
||||
|
||||
CACHEOPS_REDIS = 'redis://127.0.0.1:6379/1'
|
||||
CACHEOPS_DEFAULTS = {
|
||||
"timeout": 5,
|
||||
}
|
||||
|
||||
CACHEOPS = {
|
||||
"accounts.*": {
|
||||
"ops": "all",
|
||||
"timeout": 60 * 5,
|
||||
},
|
||||
}
|
||||
CACHEOPS_DEGRADE_ON_FAILURE = True
|
||||
CACHEOPS_ENABLED = False
|
||||
Reference in New Issue
Block a user