Module Eliom_sessions.​Session_admin

module Session_admin: sig..end


type timeout =

|TGlobal(*see global setting*)
|TNone(*explicitely set no timeout*)
|TSome of float(*timeout duration in seconds*)

Type used to describe session timeouts

type service_session

type data_session

type persistent_session

val close_service_session :
   ?close_group:bool ->
    session:service_session -> unit

val close_volatile_data_session :
   ?close_group:bool ->
    session:data_session -> unit

val close_persistent_data_session :
   ?close_group:bool ->
    session:persistent_session -> unit Lwt.t

val get_volatile_session_data :
   session:data_session ->
    table:'a Eliom_sessions.volatile_table -> 'a

Raises Not_found if no data in the table for the session.

val get_persistent_session_data :
   session:persistent_session ->
    table:'a Eliom_sessions.persistent_table -> 'a Lwt.t

Fails with lwt exception Not_found if no data in the table for the session.

val remove_volatile_session_data :
   session:data_session ->
    table:'a Eliom_sessions.volatile_table -> unit

val remove_persistent_session_data :
   session:persistent_session ->
    table:'a Eliom_sessions.persistent_table -> unit Lwt.t

val get_service_session_name : session:service_session -> string option

None means default session name

val get_volatile_data_session_name : session:data_session -> string option

None means default session name

val get_persistent_data_session_name : session:persistent_session -> string option

None means default session name

val set_service_session_timeout : session:service_session -> float option -> unit

val set_volatile_data_session_timeout : session:data_session -> float option -> unit

val set_persistent_data_session_timeout :
   session:persistent_session ->
    float option -> unit Lwt.t

val get_service_session_timeout :
   session:service_session ->
    timeout

val get_volatile_data_session_timeout :
   session:data_session ->
    timeout

val get_persistent_data_session_timeout :
   session:persistent_session ->
    timeout

val unset_service_session_timeout : session:service_session -> unit

val unset_volatile_data_session_timeout : session:data_session -> unit

val unset_persistent_data_session_timeout : session:persistent_session -> unit Lwt.t

val iter_service_sessions :
   ?sp:Eliom_sessions.server_params ->
    (service_session -> unit Lwt.t) -> unit Lwt.t

Iterator on service sessions. Lwt_unix.yield is called automatically after each iteration.

Warning: If you use this function after the initialisation phase, you must give the ~sp parameter, otherwise it will raise the exception Eliom_common.​Eliom_function_forbidden_outside_site_loading.

val iter_volatile_data_sessions :
   ?sp:Eliom_sessions.server_params ->
    (data_session -> unit Lwt.t) -> unit Lwt.t

Iterator on data sessions. Lwt_unix.yield is called automatically after each iteration.

Warning: If you use this function after the initialisation phase, you must give the ~sp parameter, otherwise it will raise the exception Eliom_common.​Eliom_function_forbidden_outside_site_loading.

val iter_persistent_data_sessions : (persistent_session -> unit Lwt.t) -> unit Lwt.t

Iterator on persistent sessions. Lwt_unix.yield is called automatically after each iteration.

val fold_service_sessions :
   ?sp:Eliom_sessions.server_params ->
    (service_session -> 'a -> 'a Lwt.t) ->
    'a -> 'a Lwt.t

Iterator on service sessions. Lwt_unix.yield is called automatically after each iteration.

Warning: If you use this function after the initialisation phase, you must give the ~sp parameter, otherwise it will raise the exception Eliom_common.​Eliom_function_forbidden_outside_site_loading.

val fold_volatile_data_sessions :
   ?sp:Eliom_sessions.server_params ->
    (data_session -> 'a -> 'a Lwt.t) ->
    'a -> 'a Lwt.t

Iterator on data sessions. Lwt_unix.yield is called automatically after each iteration.

Warning: If you use this function after the initialisation phase, you must give the ~sp parameter, otherwise it will raise the exception Eliom_common.​Eliom_function_forbidden_outside_site_loading.

val fold_persistent_data_sessions :
   (persistent_session -> 'a -> 'a Lwt.t) ->
    'a -> 'a Lwt.t

Iterator on persistent sessions. Lwt_unix.yield is called automatically after each iteration.