Merged
Conversation
Before: three classes that did almost the same things: - Pii::SessionStore - X509::SessionStore - OutOfBandSessionAccessor After: just one class, OutOfBandSessionAccessor [skip changelog]
| private | ||
| # @return [Hash] | ||
| def load | ||
| session_store.send(:load_session_from_redis, session_uuid) || {} |
Contributor
There was a problem hiding this comment.
Would it be possible to memoize this? The one section that could benefit is here where it potentially loads the session from Redis twice to fetch PII and X509 attributes separately.
Contributor
Author
There was a problem hiding this comment.
good idea! added in fef200b
I was worried that this might mess up some of our specs that rely on "fresh" data but a quick spot-check showed that they still passed
Contributor
Author
There was a problem hiding this comment.
found another allocation/instantiation we could save in 0c5a415, I think this will save creating a new redis connection
Contributor
Author
|
👀 excited to see what userinfo, token endpoint performance looks like after this shops! 🚀 |
zachmargolis
added a commit
that referenced
this pull request
Nov 29, 2022
**Why**: They were refactored away in #7295 into OutOfBandSessionAccessor#{load_pii,load_x509} [skip changelog]
zachmargolis
added a commit
that referenced
this pull request
Nov 30, 2022
**Why**: They were refactored away in #7295 into OutOfBandSessionAccessor#{load_pii,load_x509} [skip changelog]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I noticed that
Pii::SessionStorehad been refactored intoOutOfBandSessionAccessorbutX509::SessionStore(its clone) was lagging in #7290 (comment)Before: three classes that did almost the same things:
After: just one class, OutOfBandSessionAccessor