firs commit 🐼

This commit is contained in:
A'zamov Samandar
2025-04-19 14:29:36 +05:00
parent ad2b8c9717
commit a4b5833bbe
124 changed files with 5168 additions and 0 deletions

26
auth/config/conf/cache.py Normal file
View File

@@ -0,0 +1,26 @@
from config.env import env
CACHES = {
"default": {
"BACKEND": env.str("CACHE_BACKEND"),
"LOCATION": env.str("REDIS_URL"),
"TIMEOUT": env.str("CACHE_TIMEOUT"),
},
}
CACHE_MIDDLEWARE_SECONDS = env("CACHE_TIMEOUT")
CACHEOPS_REDIS = env.str("REDIS_URL")
CACHEOPS_DEFAULTS = {
"timeout": env.str("CACHE_TIMEOUT"),
}
CACHEOPS = {
# !NOTE: api => "you app name"
# "api.*": {
# "ops": "all", # Barcha turdagi so'rovlarni keshga olish
# "timeout": 60 * 5, # 5 daqiqa davomida saqlash
# },
}
CACHEOPS_DEGRADE_ON_FAILURE = True
CACHEOPS_ENABLED = env.bool("CACHE_ENABLED", False)