Skip to content
Merged
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions articles/tools/kubernetes/configuration.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,34 @@ spring:
host: redis-service
----
--

== Backend Session Expiration Policy

The backend session expiration policy allows you to define an expiration timeout for the backend stored session. By default no expiration is set, but expiration can be activated by setting the `vaadin.kubernetes.backend-session-expiration-tolerance` property or by providing a custom `SessionExpirationPolicy` bean. The property defines the amount of time to be added to the HTTP session timeout to determine the expiration of the backend session. If time unit is not given, milliseconds is assumed.

[.example]
--
.application.properties
[source,properties]
----
# Given an HTTP session timeout of 30 minuts, the session stored in the backed will expire 35 minutes of inactivity
vaadin.kubernetes.backend-session-expiration-tolerance: 5m
----

.application.yaml
[source,yaml]
----
vaadin:
kubernetes:
backend-session-expiration-tolerance: duration
----

.Java
[source,java]
----
@Bean
SessionExpirationPolicy sessionExpirationPolicy() {
return sessionTimeout -> Duration.ofMinutes(60);
}
----
--