-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
Describe the bug
SortedSetRedisSessionExpirationStore touches session itself instead of its expires key, so no Redis key event fires.
Expected behavior
Since RedisIndexedSessionRepository#onMessage listens for key events on pattern this.namespace + "sessions:expires:", SortedSetRedisSessionExpirationStore#cleanupExpiredSessions should touch expires keys instead of sessions themselves just like RedisIndexedSessionRepository.MinuteBasedRedisSessionExpirationStore or ReactiveRedisIndexedSessionRepository + SortedSetReactiveRedisSessionExpirationStore does.
I think the bug arises from the fact that SortedSetRedisSessionExpirationStore does not store expires:sessionId format in the sorted set, like the RedisIndexedSessionRepository.MinuteBasedRedisSessionExpirationStore, but only the sessionId; SortedSetReactiveRedisSessionExpirationStore does not store expires:sessionId either, just sessionId, but that is compensated in ReactiveRedisIndexedSessionRepository#cleanUpExpiredSessions where the sessionId is put into the expires key format.