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
Create Redis bulk store utils #13197
Conversation
` | ||
const keys = Object.keys(dataToStore) | ||
const values = Object.values(dataToStore) | ||
const pipeline = client.pipeline() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pipelines aren't guaranteed to be atomic. I don't believe that is important for this code, the worse that can happen is the expiry is overwritten with a slightly different time, but just wanted to point it out in case you can think of a reason it would matter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pipelines are meant to be leaner, I think they should be fine for this use case
Description
Adding a new util into our redis implementation to allow bulk stores. We use redis pipelines to perform this action atomically on the redis server
Addresses
Launchcontrol
Adding
redis.bulkStore
function