Skip to content

How to handle hybrid storage from external libraries #81

Answered by benbjohnson
dlpetrie asked this question in Q&A
Discussion options

You must be logged in to vote

But where do I handle the implementation for this? Do I handle it in the http package because it uses cookies? The redis package because it uses redis? Or is it another packaged called scs to where scs becomes the dependency I'm referencing.

If you're only managing sessions in the http layer then I think you can avoid a service interface definition entirely and just use the scs library internally in the http package.

If you are managing sessions outside the http layer, then it doesn't matter too much about which package you place it into so long as its accessible. The main benefit to having the SessionService interface would be to have swappable implementations but that's not typical fo…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by dlpetrie
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants