Closed maxcountryman closed 12 months ago
This could also check that we have a loaded persisted session, either from the store or the in-memory cache that's used for safe concurrent data access; this might be more correct because a malicious user agent could send along a bogus session ID, which would invoke the overhead of talking to the store.
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
2749adb
) 75.91% compared to head (bd8b5a6
) 76.06%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
I can confirm that this fixes the superfluous Storage::delete
calls. It still does log "created new session" and "deleted" though.
Can't wait to get this merged :)
Thanks for taking a look. I'll cut a new release shortly.
If we don't have a cookie, the session is new and therefore has never been saved. Given this, we should not invoke the overhead of talking to the store. Likewise, we don't need to set a removal cookie as we have never set the cookie.
This should address the original issue in #89.