These methods, if successful, set the value of their respective
keys. If they fail, they raise an exception (and are not
affected by the
These methods can accept a
which indicates the format in which the value will be stored on
the server, as well as a
ttl property which
indicates the lifetime of the value. After the
ttl lifetime is reached, the value is deleted
from the server.
client.set(key, value, **kwargs)
Sets the key unconditionally.
client.add(key, value, **kwargs)
Sets the key to the specified value, but only if the key does not already exists (an exception is raised otherwise).
client.replace(key, value, **kwargs)
Replaces an existing key with a new value. This raises an exception if the key does not already exist.