This commit is contained in:
2024-08-07 08:57:56 +03:00
parent 1d4fa4b977
commit 60a56fd098
27 changed files with 40 additions and 40 deletions

11
cache/memorycache.py vendored Normal file
View File

@@ -0,0 +1,11 @@
from dogpile.cache import make_region
from settings import REDIS_URL
# Создание региона кэша с TTL
cache_region = make_region()
cache_region.configure(
"dogpile.cache.redis",
arguments={"url": f"{REDIS_URL}/1"},
expiration_time=3600, # Cache expiration time in seconds
)