You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Martin Halliday edited this page Aug 12, 2016
·
2 revisions
Sessionmiddleware does not have to implement IUpstreamSession but any full featured implementation should. Sessionmiddleware that implements this interface is providing a way for other downstream middleware to tell the sessionmiddleware if session is required or not for a request. This allows the sessionmiddleware to skip loading session information where it is not required which is a huge performance benefit in certain scenarios.
For example middleware that serves static files probably does not need session to correctly handle requests. In this case if the static file middleware determines that the request is for a static file, it can use the IUpstreamSession interface to tell the sessionmiddleware to not bother retrieving session from the session store.