spring-session
spring-session copied to clipboard
Consider making FindByIndexNameSessionRepository a standalone interface
As discussed with @rwinch today, we could consider making FindByIndexNameSessionRepository a standalone interface. At present, it extends SessionRepository.
Some of the relevant points that we discussed:
- users are encouraged to interact with sessions using their web framework's native session facilities (that is, Servlet's
HttpSessionof Spring WebFlux'sWebSession) which means direct interaction withSessionRepositoryoperations is not a common use case - OTOH
FindByIndexNameSessionRepositoryoperations are Spring Session's own thing - mixed usage of
SessionRepositoryandFindByIndexNameSessionRepositoryisn't a common thing (Spring Boot's Actuator sessions endpoint is an outlier here) which means user impact from having latter not extend the former any more is expected to be insignificant - having
FindByIndexNameSessionRepositoryas standalone allows users to implement their own indexing support without having to use a non-defaultSessionRepositoryimplementation (for example,RedisSessionRepositoryvsRedisIndexedSessionRepositoryconsideration) - this also somewhat impacts https://github.com/spring-projects/spring-boot/issues/10827
This has been done for the reactive side as part of #2700.