Parameter IO.2-Now
val default_period : t -> period
default_period t
returns default period after which session keys will expire. Depending on the backend, this value may vary over time.
val generate : ?expiry:period -> ?value:value -> t -> key
generate ?expiry ?value t
will allocate a new session in the backendt
and return its associatedkey
. The session will expireexpiry
seconds from now, defaulting todefault_period t
if one is not explicitly specified.The key should be unique, though it may not be in order to allow implementations that use randomness or hashing to conform to this interface.
val clear : t -> key -> unit
clear t key
removeskey
from the backendt
. The backend may choose to persist the session value beyond this call, but any subsequent calls operations involvingkey
should behave as ifkey
is not present in the backend.