4b697009d3
Closes #27416 Signed-off-by: Alexander Schwartz <aschwart@redhat.com>
22 lines
1.2 KiB
Text
22 lines
1.2 KiB
Text
[[offline-sessions-preloading]]
|
|
|
|
=== Offline sessions preloading
|
|
|
|
In addition to Infinispan caches, offline sessions are stored in a database which means they will be available even after server restart.
|
|
By default, the offline sessions are not preloaded from the database into the Infinispan caches during the server startup, because this
|
|
approach has a drawback if there are many offline sessions to be preloaded. It can significantly slow down the server startup time.
|
|
Therefore, the offline sessions are lazily fetched from the database by default.
|
|
|
|
However, {project_name} can be configured to preload the offline sessions from the database into the Infinispan caches during the server startup.
|
|
It can be achieved by setting `preloadOfflineSessionsFromDatabase` property in the `userSessions` SPI to `true`.
|
|
|
|
:tech_feature_name: Offline session preloading
|
|
:tech_feature_id: offline-session-preloading
|
|
include::../templates/deprecated.adoc[]
|
|
|
|
The following example shows how to configure offline sessions preloading.
|
|
|
|
[source,bash]
|
|
----
|
|
bin/kc.[sh|bat] start --features-enabled offline-session-preloading --spi-user-sessions-infinispan-preload-offline-sessions-from-database=true
|
|
----
|