MCPcopy
hub / github.com/long2ice/fastapi-cache / get

Method get

fastapi_cache/backends/memcached.py:15–16  ·  view source on GitHub ↗
(self, key: str)

Source from the content-addressed store, hash-verified

13 return 3600, await self.get(key)
14
15 async def get(self, key: str) -> Optional[bytes]:
16 return await self.mcache.get(key.encode())
17
18 async def set(self, key: str, value: bytes, expire: Optional[int] = None) -> None:
19 await self.mcache.set(key.encode(), value, exptime=expire or 0)

Callers 1

get_with_ttlMethod · 0.95

Calls 1

encodeMethod · 0.45

Tested by

no test coverage detected