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