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

Reduce exists command by loading from private_id first #148

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hogelog
Copy link

@hogelog hogelog commented May 21, 2023

The current redis-session-store has been implemented to throw the exists command to redis twice.

key_exists_with_fallback?(value)

key_exists?(sid.private_id) ? sid.private_id : sid.public_id

With this PR implementation, a session that has not been migrated to private_id will throw get commands to private_id and public_id twice. But migrated session will only get once, which I think is more efficient.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant