install all packages and configurate

This commit is contained in:
behruz-dev
2025-07-30 17:03:37 +05:00
parent da201800b4
commit f89a257553
10 changed files with 167 additions and 8 deletions

24
config/conf/redis.py Normal file
View 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