-
Notifications
You must be signed in to change notification settings - Fork 398
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
Improve session support to be more friendly to persistent and expensive stores. #447
Comments
@alkemist you want this to lead to ratpack-hazelcast in the end, any particular reason on hazelcast vs say redis? Don't get me wrong, I use and love hazelcast. I'm just curious if there was a reason. Is it because it's very easy to integrate on JVM? |
@wmacgyver I do want both. That is, the idea is that you can drop in different impls. |
Do we want to add support for other session-related capabilities as part of this? Invalidate, get/set timeout, start time, last access time? Link to equivalent shiro interface: |
wow, feature creep already :) |
@davidmc24 I'd say a lot of that makes sense to include. |
For a first cut I landed on the following:
This will allow expensive stores but didn't get into the Type based storage. |
shouldn't invalid/timeout be part of the interface too? |
@wmacgyver can you elaborate? |
Invalidate and timeout are part of the session itself not the storage inside a session. We currently have these split. So you can invalidate and time out sessions without ever using a session storage. |
@wmacgyver Its confusing look for some docs soon... |
It's also not set in stone. We may in fact merge these two things. |
Conflicts: ratpack-session/src/main/java/ratpack/session/clientside/internal/CookieBasedSessionStorageBindingHandler.java ratpack-session/src/main/java/ratpack/session/clientside/internal/InitialStorageContainer.java ratpack-session/src/test/groovy/ratpack/session/clientside/ClientSideSessionSpec.groovy
This is a bit of a breaking change and it wasn't obvious at first why. The promise needs to be acted on for the SessionStorage methods to do anything. this code:
now needs to be:
I'm not sure if there is a cleaner way to handle this. |
It actually needs to be:
Otherwise, you are issuing the redirect and then clearing the session. Re not subscribing to the session, we are working on some diagnostics that would have helped to point this out. |
Ah cool yes that makes sense now, thanks! |
What is currently
SessionStorage
should become:The text was updated successfully, but these errors were encountered: