spring-projects / spring-projects/spring-session
Feature to handle Deletion/Expiration in ReactiveRedisSessionRepository similar to RedisIndexedSessionRepository
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.9k
- Forks
- 1.2k
- Avg merge
- 4h 27m
- Merged PRs (30d)
- 55
Description
Context
Feature similar requested in [ReactiveRedisSessionRepository as similar to RedisIndexedSessionRepository (Expiration of keys to be handled in Spring framework instead of Redis expiry)
Motivation:
In Redis, there is no hard rule, that key will gets deleted once the TTL is expired, as expiration runs in a separate background thread, which is of least priority.
This scenario is handled in spring as part of RedisIndexedSessionRepository (3 keys gets created as part of session)
1)spring:session:sessions:33fdd1b6-b496-4b33-9f7d-df96679d32fe
2)spring:session:sessions:expires:33fdd1b6-b496-4b33-9f7d-df96679d32fe
3)spring:session:expirations1439245080000
With the help of keys 2 and 3 and its TTL, Spring-session framework decides, spring:session:sessions:33fdd1b6-b496-4b33-9f7d-df96679d32fe to. be accessed or deleted``` and deltion is taken care as part of scheduled cron job
Where as in case of ReactiveRedisSessionRepository, there is no such feature. Seems like expiration is completely handed over to redis.
Is there any reason/motivation behind, for not having this feature present in ReactiveRedisRepository as its good to have from session mgmt.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with ReactiveRedisSessionRepository and compare it with RedisIndexedSessionRepository, which the issue identifies as the existing model for expiration handling. Trace how session, expiration, and expiration-index keys are managed in the indexed repository. Done means the reactive repository provides equivalent framework-managed deletion or expiration behavior, with tests covering it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, redis, spring
- Domain
- backend, databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100