Closed tiger5226 closed 2 years ago
Sorry for the terribly slow reply.
This is quite a nice idea, but it's currently possible by creating your own store implementation with the necessary cleanup logic by copying (or even just embedding!) one of the existing ones.
If you're motivated to make the necessary code changes to all the existing SCS store repositories (in a non-breaking way) to support hooks, then I'd be happy to accept a PR (though please write back to discuss the design of the hooks before doing any work).
Otherwise, I'm inclined to close the issue as I feel there is a reasonable work around to achieve the behaviour (i.e. implement your own store).
@tiger5226 I'd like to finalize what, if anything, needs to be done on this issue. I think that creating a custom Store
instance with the necessary cleanup hooks is a pragmatic way to achieve this, but if you have the time and inclination to implement the hook logic in the existing session stores and send a PR I'm happy to keep this open.
To keep the issues list clean I'm going to close this. If you'd like to work on it, or think that further discussion is needed, please feel free to re-open.
Some information from sessions might want to be stored per user long term. For example, start and end of a session is important information.