Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Configurable Property for Custom Session Index Name in Redis #3254

Open
AlefMemTav opened this issue Oct 28, 2024 · 0 comments
Open

Add Configurable Property for Custom Session Index Name in Redis #3254

AlefMemTav opened this issue Oct 28, 2024 · 0 comments
Labels
status: waiting-for-triage An issue we've not yet triaged type: enhancement A general enhancement

Comments

@AlefMemTav
Copy link

AlefMemTav commented Oct 28, 2024

Note: I'm not sure if it's currently possible to configure this index name, at least not in an easy or straightforward way.

It should be possible to configure a custom name for the session index, allowing shorter and more readable entries in Redis. This could help users who need simpler key structures for session management, enhancing readability and potentially optimizing performance by avoiding long, repetitive index names.

Currently, the session index name is hard-coded asorg.springframework.session.FindByIndexNameSessionRepository.PRINCIPAL_NAME_INDEX_NAME. When retrieving keys with commands like keys *, this long, detailed naming convention leads to outputs such as:

spring:session:index:org.springframework.session.FindByIndexNameSessionRepository.PRINCIPAL_NAME_INDEX_NAME:pedro123

This default naming makes the keys verbose and harder to work with.

This issue impacts readability and manageability of session-related keys in Redis. When working with numerous sessions, especially for applications with a high volume of users, this long index name can clutter the database and make debugging more challenging. I've explored options for a workaround, but currently, the only solution would be to allow a configurable property for this session index name.

@AlefMemTav AlefMemTav added status: waiting-for-triage An issue we've not yet triaged type: enhancement A general enhancement labels Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting-for-triage An issue we've not yet triaged type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

1 participant