2

Is there an optimized way to RPUSH all the values of a set to a list without SPOP-ing them one by one (or SMEMBERS)? (I need to perform bulk RPUSH of huge set each T time to a list) ?

Thank you,

3

Actually there is but not where you'd intuitively think of looking for it. Have a look at SORT - this should do what you need:

SORT myset BY nosort STORE mylist

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.