cached-all

This commit is contained in:
2024-03-12 17:26:52 +03:00
parent a3303837d5
commit e99acd591a
4 changed files with 29 additions and 17 deletions

View File

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