Parameter Make.1-B
type +'a io
= 'a Lwt.t
The type of a blocking computation that will produce a value of type
'a
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 io
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 io
clear t key
removeskey
from the backendt
. The backend may choose to persist the session value beyond this call. If it does any subsequent operations involvingkey
behave as if it was not there.