Closed igorper closed 10 years ago
You're right, an oversight on my part. I think this is a good idea.
I'm working on some performance-related weirdness with the new 'nodelay' option in redisConnect. As soon as I finish that, I'll add this to the list push functions (maybe this weekend?).
Cheers,
Bryan
That's perfect!
Sorry it took so long, I got tied up with some other projects.
The new syntax is:
redisLPush(key, value, ...) redisRPush(key, value, ...)
where ... indicates optional additional values. It's not enough to just supply value as a list or vector, because of course lists and vectors are valied list entries themselves.
You can call it like this:
redisLPush("key", pi, 1, "cazart")
or more programatically via do.call:
do.call("redisLPush",args=list(key="key", pi,1,"cazart"))
Perfect!
It seems like inserting multiple list elements is not possible with the current redisLPush/redisRPush implementation (despite this being supported in redis).
Would it make sense to implement this (e.g. by breaking a vector of values into individual list items and inserting them)? A flag could be used to enable this option (to provide backwards compatibility).