-
Notifications
You must be signed in to change notification settings - Fork 139
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
method for get + del #159
Comments
I think you can achieve the same with |
Single-use tokens (such as OTPs) cannot be used under two circumstances:
TTL solves the first problem. This |
It's a very specific use case I think. You can however make use of the current methods and implement your use case. Like |
Hey @KrishnaPG this sounds like a decent use-case. PR welcome 😊 |
Thank you. PR #160 |
Thank you! 👍 pr was merged and published in v5.0.2! |
For storing one-time reference items, such as OTP, it would be useful to have a method, say
take
, that would return the object and also delete it from the cache (so that any furtherget
will result inundefined
).Something like below:
While this can be easily done at the app-level, for stronger semantics it would be nice to have in the API itself, if possible.
The text was updated successfully, but these errors were encountered: