fix(api): TTL for Redis Cache

This commit is contained in:
TheOnlyWayUp
2024-11-30 23:44:07 +00:00
parent 5f0676a19d
commit 5687c5f2cd
+3 -1
View File
@@ -87,7 +87,9 @@ if config.USE_CACHE:
cache = FileBackend(use_temp=True, expire_after=43200) # 12 hours cache = FileBackend(use_temp=True, expire_after=43200) # 12 hours
case CacheTypes.redis: case CacheTypes.redis:
cache = RedisBackend( cache = RedisBackend(
cache_name="wpd-aiohttp-cache", address=config.REDIS_CONNECTION_URL cache_name="wpd-aiohttp-cache",
address=config.REDIS_CONNECTION_URL,
expire_after=43200, # 12 hours
) )
else: else:
cache = None cache = None