At first, I use 'FindByIndexNameSessionRepository' and my webserver skill is like beginner.
I want to delete all spring session in redis or delete by lastAccessedTime. FindByIndexNameSessionRepository has deleteById but not deleteAll.
Why I find this, Redis session's index data are piled too many, these makes findByPrincipalName show slow performance.
Our project's session data control follow these steps.
- If user login to server, remove previous session data.
- create new session data.
In this steps, if many user login just once, unnecessary session data is piled up.
So I think, management index is delete data with some condition periodically.
If you know better idea or usual way to contol session, please guide to me.
Thanks.