mirror of
https://github.com/long2ice/fastapi-cache.git
synced 2026-03-25 04:57:54 +00:00
fix: replace pipe for Optional
This commit is contained in:
@@ -20,7 +20,7 @@ class InMemoryBackend(Backend):
|
|||||||
def _now(self) -> int:
|
def _now(self) -> int:
|
||||||
return int(time.time())
|
return int(time.time())
|
||||||
|
|
||||||
def _get(self, key: str) -> Value | None:
|
def _get(self, key: str) -> Optional[Value]:
|
||||||
v = self._store.get(key)
|
v = self._store.get(key)
|
||||||
if v:
|
if v:
|
||||||
if v.ttl_ts < self._now:
|
if v.ttl_ts < self._now:
|
||||||
|
|||||||
Reference in New Issue
Block a user