//  ========================================================================
//  Copyright (c) 1995-2017 Mort Bay Consulting Pty. Ltd.
//  ========================================================================
//  All rights reserved. This program and the accompanying materials
//  are made available under the terms of the Eclipse Public License v1.0
//  and Apache License v2.0 which accompanies this distribution.
//
//      The Eclipse Public License is available at
//      http://www.eclipse.org/legal/epl-v10.html
//
//      The Apache License v2.0 is available at
//      http://www.opensource.org/licenses/apache2.0.php
//
//  You may elect to redistribute this code under either of these licenses.
//  ========================================================================

[[configuring-sessions-memory]]

=== Non-Clustered Session Management: Memory

Non-clustered, in-memory-only is the default style of Session Management.
In previous versions of Jetty this was referred to as "hash" sessions, as they were stored in a `HashMap` in  memory.
When using the Jetty distribution, if you do not configure any session module, this will be enabled by default.

Specifically, Jetty will hook up:

A `DefaultSessionIdManager`::
* Produces unique session ids and supports cross-context dispatch re-use of session ids
A `HouseKeeper`::
* Scavenges for expired sessions every 10 mins
A `DefaultSessionCache` per context::
* Keeps session objects in memory
A `NullSessionDataStore` per context::
* No persistence of sessions

If you wish to change any of the default configuration, enable the `session-cache-hash` module.
