![]() Version: 9.4.12.v20180830 |
private support for your internal/customer projects ... custom extensions and distributions ... versioned snapshots for indefinite support ... scalability guidance for your apps and Ajax/Comet projects ... development services for sponsored feature development
In the absence of any explicit configuration, Jetty will instantiate an instance of the DefaultSessionCache
per context.
If you wish to change any of the default values, you need to enable the session-cache-hash
module.
Once the session-cache-hash
module has been enabled, you can view a list of all the configurable values by opening start.d/session-cache-hash.ini
:
--module=session-cache-hash #jetty.session.evictionPolicy=-1 #jetty.session.saveOnInactiveEvict=false #jetty.session.saveOnCreate=false #jetty.session.removeUnloadableSessions=false
Integer.
Controls whether session objects that are held in memory are subject to eviction from the memory cache.
Evicting sessions can reduce the memory footprint of the cache.
Eviction is usually used in conjunction with a SessionDataStore
that persists sessions.
Values are:
Note
If you are not using a
SessionDataStore
that persists sessions, be aware that evicted sessions will be lost.
false
.
Controls whether a session will be saved to the SessionDataStore
just prior to its eviction.false
.
Controls whether a session that is newly created will be immediately saved to the SessionDataStore
or lazily saved as the last request for the session exits.false
.
Controls whether a session that cannot be restored - for example because it is corrupted - from the SessionDataStore
is deleted by the SessionDataStore
.For more general information on the uses of these configuration properties, see Session Components.
The NullSessionCache
is a trivial implementation of the SessionCache
that does not cache any session information.
You may need to use it if your clustering setup does not have a sticky load balancer, or if you want absolutely minimal support for sessions.
If you use this in conjunction with the NullSessionDataStore
, then sessions will neither be retained in memory nor persisted.
To enable the NullSessionCache
, enable the sesssion-cache-null
module.