From 2f1b1409b9356c590e7dd0f05baa9def8782e92a Mon Sep 17 00:00:00 2001 From: kailyn <34443073+cnkailyn@users.noreply.github.com> Date: Sun, 24 Apr 2022 11:19:20 +0800 Subject: [PATCH] bugfix: '+' is more prior than 'or' --- fastapi_cache/backends/inmemory.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fastapi_cache/backends/inmemory.py b/fastapi_cache/backends/inmemory.py index 4e5e5c0..4238b24 100644 --- a/fastapi_cache/backends/inmemory.py +++ b/fastapi_cache/backends/inmemory.py @@ -43,7 +43,7 @@ class InMemoryBackend(Backend): async def set(self, key: str, value: str, expire: int = None): async with self._lock: - self._store[key] = Value(value, self._now + expire or 0) + self._store[key] = Value(value, self._now + (expire or 0)) async def clear(self, namespace: str = None, key: str = None) -> int: count = 0