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