LINSERT key BEFORE|AFTER pivot element

    Time complexity: O(N) where N is the number of elements to traverse before seeing the value pivot. This means that inserting somewhere on the left end on the list (head) can be considered O(1) and inserting somewhere on the right end (tail) is O(N).

    Inserts in the list stored at key either before or after the reference value .

    An error is returned when exists but does not hold a list value.

    : the length of the list after the insert operation, or -1 when the value was not found.

    *Examples

    redis> RPUSH mylist "World"

    redis> LINSERT mylist BEFORE "World" "There"

    redis>