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

Delete key if resulting TTL is negative in set method #322

Merged

Conversation

baumgarb
Copy link
Contributor

If the set method is invoked with a session object which has a cookie
that expires in the past then the key is deleted / destroyed. Otherwise,
a negative TTL is calculated and that leads to Redis throwing an error
'ERR invalid expire time in set'.

If the set method is invoked with a session object which has a cookie
that expires in the past then the key is deleted / destroyed. Otherwise,
a negative TTL is calculated and that leads to Redis throwing an error
'ERR invalid expire time in set'.
@baumgarb baumgarb force-pushed the feature/321/delete-key-in-set-if-ttl-is-negative branch from f047eaf to 65387e4 Compare April 20, 2021 15:46
@wavded wavded self-assigned this Apr 20, 2021
@wavded wavded changed the title Delete key if resulting TTL is negative in set method. (#321) Delete key if resulting TTL is negative in set method Apr 20, 2021
@wavded wavded merged commit 27c7a5e into tj:master Apr 20, 2021
@wavded
Copy link
Collaborator

wavded commented Apr 20, 2021

Thanks @baumgarb !

@baumgarb baumgarb deleted the feature/321/delete-key-in-set-if-ttl-is-negative branch April 20, 2021 17:28
@baumgarb
Copy link
Contributor Author

Oh sweet, thanks a lot for reviewing and merging so fast @wavded :)

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

Successfully merging this pull request may close these issues.

None yet

3 participants