mirror of
https://github.com/long2ice/fastapi-cache.git
synced 2026-03-25 04:57:54 +00:00
bugfix: '+' is more prior than 'or'
This commit is contained in:
@@ -43,7 +43,7 @@ class InMemoryBackend(Backend):
|
|||||||
|
|
||||||
async def set(self, key: str, value: str, expire: int = None):
|
async def set(self, key: str, value: str, expire: int = None):
|
||||||
async with self._lock:
|
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:
|
async def clear(self, namespace: str = None, key: str = None) -> int:
|
||||||
count = 0
|
count = 0
|
||||||
|
|||||||
Reference in New Issue
Block a user