Browseable session backend
==========================

Presentation
------------

Browseable session backend
(`Apache::Session::Browseable <https://metacpan.org/pod/Apache::Session::Browseable>`__)
works exactly like Apache::Session::\* corresponding module but add
index that increase the speed of some operations. It is recommended in production deployments.

.. note::

    Without index, LL::NG will have to retrieve all sessions stored in
    backend and deserialize then filter each of them.

The following table list fields to index for each session type:


.. _fieldstoindex:

List of fields to index by session type
---------------------------------------

==========================  ======================================================================
Session Type                Fields to index
==========================  ======================================================================
Sessions (global)           \_whatToTrace \_session_kind \_utime ipAddr \_httpSessionType user
Persistent sessions         \_session\_kind \_httpSessionType \_session\_uid ipAddr \_whatToTrace
CAS sessions                \_cas\_id pgtIou
SAML sessions               \_session_kind \_utime \_saml_id ProxyID \_nameID \_assert_id \_art_id
OpenID Connect sessions     \_session_kind \_utime
==========================  ======================================================================

.. note::

   If you have configured LemonLDAP::NG to use something other than
   `_whatToTrace` as the main session identifier, you must replace
   `_whatToTrace` with the new session field in the previous list

See Apache::Session::Browseable man page to see how use indexes.

.. tip::

    It is advised to use separate session backends for standard sessions, SAML
    sessions and CAS sessions, in order to avoid unused indexes.



Available backends
------------------

.. toctree::
   :maxdepth: 1

   PgJSON Backend (recommended) <pgjsonsessionbackend>
   browseablemysqlsessionbackend
   browseableldapsessionbackend
   nosqlsessionbackend
