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
{{ message }}
Repository navigation
Cache user session ids for faster user sessions retrieval
#8716
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.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Hi Everyone,
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.
You may refer to the PR i've created -> #8715
Please let me know your thoughts. Thanks.
All reactions