spring-session icon indicating copy to clipboard operation
spring-session copied to clipboard

Consider making FindByIndexNameSessionRepository a standalone interface

Open vpavic opened this issue 3 years ago • 1 comments

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 HttpSession of Spring WebFlux's WebSession) which means direct interaction with SessionRepository operations is not a common use case
  • OTOH FindByIndexNameSessionRepository operations are Spring Session's own thing
  • mixed usage of SessionRepository and FindByIndexNameSessionRepository isn'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 FindByIndexNameSessionRepository as standalone allows users to implement their own indexing support without having to use a non-default SessionRepository implementation (for example, RedisSessionRepository vs RedisIndexedSessionRepository consideration)
  • this also somewhat impacts https://github.com/spring-projects/spring-boot/issues/10827

vpavic avatar Aug 10 '22 21:08 vpavic

This has been done for the reactive side as part of #2700.

marcusdacoregio avatar Feb 27 '24 11:02 marcusdacoregio