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

Should use atomic PSETEX instead of SET+EXPIRE/PEXPIRE #17

Closed
clue opened this issue Feb 15, 2019 · 5 comments
Closed

Should use atomic PSETEX instead of SET+EXPIRE/PEXPIRE #17

clue opened this issue Feb 15, 2019 · 5 comments

Comments

@clue
Copy link

clue commented Feb 15, 2019

This project should probably use the atomic PSETEX command instead of two individual SET and EXPIRE calls:

PSETEX key 1500 value
SET key value
PEXPIRE key 1500

Additionally, in fact this project currently uses EXPIRE instead of PEXPIRE and as such only provides full second accuracy. It's my understanding this should probably be updated to use millisecond precision as given above.

@WyriHaximus
Copy link
Owner

It should indeed! Thank you for bringing this to my attention, would you be up for creating a PR changing the behavior?

@clue
Copy link
Author

clue commented Feb 15, 2019

I've spotted this during a quick project evaluation for a project I'm currently working on, so this will be of interest in the future. Expect this to take at least a couple of weeks, so let's see who's faster with filing a PR, cheers! 🥇

WyriHaximus added a commit that referenced this issue Feb 15, 2019
@WyriHaximus
Copy link
Owner

WyriHaximus commented Feb 15, 2019

#18 is up with a fix for this 👍 🎉

@clue
Copy link
Author

clue commented Feb 16, 2019

@WyriHaximus Thanks for the quick update, LGTM! :shipit:

@WyriHaximus
Copy link
Owner

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

No branches or pull requests

2 participants