BLPOP extracts/pops an item from the Left/HEAD of the first non-empty list. This is a blocking operation, so if no item is available in the provided list, this command will wait.
Trim a Redis list, and remove items from the list from one or both end(s). We provide a starting and ending index for the trim and the items outside that window are removed. If all items are removed while trimming, then the list is deleted. Indexes are Zero(0) based.
Remove items from a list. We can provide a
Change/replace value at a specific index of a list. For the command to work there should be an existing list, with some items and we can only change items that are already set(have an index). Both positive and negative indexes will work for this command. Index is zero(0) based. So the first item is considered at index Zero(0).
LPOP removes the first element from the Left/HEAD of the list and then returns it. Count is an optional argument provided for the command, this is used to pop multiple items. If the list has no element left after executing the LPOP command, then the list is deleted after the item(s) popped.
LMPOP command pops one or more items from list(s). This operation can be performed on multiple lists. In case of multiple lists, the pop operation will be performed on the first non-empty list. This command is useful when we have multiple lists serving similar purposes, and we want to pop items from any of the lists if there are items in it.
Get the index of item(s) in the list, which matches the provided item. Operation can be performed starting from the HEAD or from the TAIL. This command is useful for checking the position/index of an item in the list, and also useful for checking the existence of an item in the list. Index of the list item is Zero based. The first item is at index Zero(0). If the command does not return (nil). Instead, return some index value (can be zero) which means the item exists in the list.
Insert an element in the list, before or after a specific element. This command does not insert an element at a specific position/index of the list. It searches for the reference element(pivot), and after the pivot element is found then the new element is inserted before/after that specific element. So finding the pivot element is important. If the pivot/reference is not found then the command fails.
Get the length of a list. We get zero as a result for a non-existing list and an exception is thrown for a wrong data type.
Get an element from a list at a specific index. Time complexity of this command is O(N). Here N is the number of items that we have to go through to get the specified index. In the case of positive indexing, the counting starts from the HEAD/Left. In the case of negative indexing, the counting starts from the TAIL/Right end.