This is server API (go to client)

Module Eliom_state

module Eliom_state : sig..end

Storing server-side values for your applications or sessions.


Please read the Eliom manual before this page to learn how server side state works.

Managing the state of an application

Closing sessions, removing state data and services

val discard : 
  scope:[< `Client_process of Eliom_common.scope_hierarchy
   | `Request
   | `Session of Eliom_common.scope_hierarchy
   | `Session_group of Eliom_common.scope_hierarchy ] ->
  ?secure:bool -> unit -> unit Lwt.t

Delete server-side (volatile and persistent) state data and services for a session, a group of sessions, a client process or a request.

Use that function to close a session (using scope Eliom_common.session).

Closing a group of sessions will close all sessions in the group.

By default will remove both secure and unsecure data and services, but if ~secure is present.

Warning: you may also want to unset some request-scoped Eliom references when discarding a state.

val discard_all_scopes : ?secure:bool -> unit -> unit Lwt.t
val discard_data : 
  ?persistent:bool ->
  scope:[< `Client_process of Eliom_common.scope_hierarchy
   | `Request
   | `Session of Eliom_common.scope_hierarchy
   | `Session_group of Eliom_common.scope_hierarchy ] ->
  ?secure:bool -> unit -> unit Lwt.t

Remove current state data.

If the optional parameter ?persistent is not present, will remove both volatile and persistent data. Otherwise only volatile or persistent data.

val discard_services : 
  scope:[< Eliom_common.user_scope ] -> ?secure:bool -> unit -> unit

Remove all services registered for the given scope (the default beeing `Session).

State status

The following functions return the current state of the state