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.
Describe the bug
SortedSetRedisSessionExpirationStoretouches session itself instead of its expires key, so no Redis key event fires.Expected behavior
Since
RedisIndexedSessionRepository#onMessagelistens for key events on patternthis.namespace + "sessions:expires:",SortedSetRedisSessionExpirationStore#cleanupExpiredSessionsshould touch expires keys instead of sessions themselves just likeRedisIndexedSessionRepository.MinuteBasedRedisSessionExpirationStoreorReactiveRedisIndexedSessionRepository+SortedSetReactiveRedisSessionExpirationStoredoes.I think the bug arises from the fact that
SortedSetRedisSessionExpirationStoredoes not storeexpires:sessionIdformat in the sorted set, like theRedisIndexedSessionRepository.MinuteBasedRedisSessionExpirationStore, but only thesessionId;SortedSetReactiveRedisSessionExpirationStoredoes not storeexpires:sessionIdeither, justsessionId, but that is compensated inReactiveRedisIndexedSessionRepository#cleanUpExpiredSessionswhere thesessionIdis put into the expires key format.