Repository navigation
Conversation
Author
|
@stianst , didn't know there's a new store, but that would be perfect if issue is fixed in the new store. |
Contributor
|
I'm going to close this as it's not a good approach to create another cache for this purpose. It'll use additional memory, and will also get out of sync I would imagine. Infinispan already has supported for indexing and querying, which should be used for cases like this. |
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 the API to retrieve user sessions is getting slower as the number of active user sessions increase. After looking at InfinispanUserSessionProvider, I realized that retrieving sessions for a user ends up iterating all the sessions from the "sessions" cache.
To address this, I'm proposing to cache the user's session ids and use that cache to retrieve all the sessions of a user. The cache gets updated by listening to events from "sessions" cache. Basically, an entry for a user will be added or updated whenever a session is created or removed for a particular user.