@API.register<EOL><INDENT>@API.aiocache_enabled(fake_return=True)<EOL>@API.timeout<EOL>@API.plugins<EOL>async def add(self, key, value, ttl=SENTINEL, dumps_fn=None, namespace=None, _conn=None):<DEDENT>
start = time.monotonic()<EOL>dumps = dumps_fn or self._serializer.dumps<EOL>ns_key = self.build_key(key, namespace=namespace)<EOL>await self._add(ns_key, dumps(value), ttl=self._get_ttl(ttl), _conn=_conn)<EOL>logger.debug("<STR_LIT>", ns_key, True, time.monotonic() - start)<EOL>return True<EOL>
Stores the value in the given key with ttl if specified. Raises an error if the
key already exists.

:param key: str
:param value: obj
:param ttl: int the expiration time in seconds. Due to memcached
    restrictions if you want compatibility use int. In case you
    need miliseconds, redis and memory support float ttls
:param dumps_fn: callable alternative to use as dumps function
:param namespace: str alternative namespace to use
:param timeout: int or float in seconds specifying maximum timeout
    for the operations to last
:returns: True if key is inserted
:raises:
    - ValueError if key already exists
    - :class:`asyncio.TimeoutError` if it lasts more than self.timeout