Closed theronic closed 4 years ago
Might depend a little on what you mean by "a bunch" (e.g. if you need laziness). Assuming you don't need laziness, mset
is probably your best bet.
You can use Carmine's redis-call
command to create a large mset
call, e.g.: (wcar {} (redis-call (into [:mset] my-kvs)))
).
Otherwise something like a doseq
with set
calls in a pipeline should also probably be fine.
Hope that helps :-)
What's the fastest way to write a bunch of keys to Redis? Should I do a pmap, mapv, doseq over a vector, separate wcar calls? Pipelining?