I wanna know if only lrange
could get a List in Redis
? It needs the end
parameter, and if I wanna the full List, I must use llen
to get the length first. Like this:
redis.lrange("myList", 0, llen("myList"));
Whether there's any method can get a full List directly?
You can use -1 as an index of last element. This will get you the whole list:
lrange mylist 0 -1
And this will get whole list but the last element
lrange mylist 0 -2
And so forth...
By the way, it's all written in the documentation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With