Skip to content

SortedSetRedisSessionExpirationStore touches Session itself instead of its expires keyΒ #3468

@mrfilipenko

Description

@mrfilipenko

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions