Redis · Command
LINSERT
Inserts a value before or after a matching value in a Redis list. It returns the list length, 0 for a missing key, or -1 when the pivot is not found.
Last updated
- Since
- 2.2.0
Syntax
LINSERT key <BEFORE | AFTER> pivot elementIn-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
BLMOVEBLMPOPBLPOPBRPOPBRPOPLPUSHLINDEXLLENLMOVE