adjust cache expiration policy (#1284)

This commit is contained in:
LawyZheng
2024-11-28 16:37:25 +08:00
committed by GitHub
parent 6a23a9fff6
commit c4338e9b21
2 changed files with 15 additions and 5 deletions

View File

@@ -14,7 +14,6 @@ class LocalCache(BaseCache):
if key not in self.cache:
return None
value = self.cache[key]
await self.set(key, value)
return value
async def set(self, key: str, value: Any, ex: Union[int, timedelta, None] = CACHE_EXPIRE_TIME) -> None: