Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spring Session: Document different way to specify the session timeouts #357

Open
ghillert opened this issue Apr 17, 2024 · 0 comments
Open

Comments

@ghillert
Copy link
Contributor

We should document the various ways to specify session timeouts (expiration of HTTP session entries in the respective Coherence cache). This should also include an explanation of the overriding behavior in case session expiration timeouts are specified in multiple locations:

  1. Setting the expiry via coherence-cache-config.xml

  2. In Spring boot using spring.session.timeout = 10m

  3. Via annotation @EnableCoherenceHttpSession(sessionTimeoutInSeconds = 5)

  4. By extending CoherenceSpringSessionConfiguration

  5. By declaring a SessionRepositoryCustomizer<CoherenceIndexedSessionRepository> bean:

@Bean
public static SessionRepositoryCustomizer<CoherenceIndexedSessionRepository> sessionRepositoryCustomizer() {
  return (sessionRepository) -> {
    sessionRepository.setDefaultMaxInactiveInterval(Duration.ofSeconds(120));
  };
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant