@API.register<EOL><INDENT>@API.aiocache_enabled()<EOL>@API.timeout<EOL>@API.plugins<EOL>async def get(self, key, default=None, loads_fn=None, namespace=None, _conn=None):<DEDENT>
start = time.monotonic()<EOL>loads = loads_fn or self._serializer.loads<EOL>ns_key = self.build_key(key, namespace=namespace)<EOL>value = loads(await self._get(ns_key, encoding=self.serializer.encoding, _conn=_conn))<EOL>logger.debug("<STR_LIT>", ns_key, value is not None, time.monotonic() - start)<EOL>return value if value is not None else default<EOL>
Get a value from the cache. Returns default if not found.

:param key: str
:param default: obj to return when key is not found
:param loads_fn: callable alternative to use as loads function
:param namespace: str alternative namespace to use
:param timeout: int or float in seconds specifying maximum timeout
    for the operations to last
:returns: obj loaded
:raises: :class:`asyncio.TimeoutError` if it lasts more than self.timeout