Redis · Command
LTRIM
Trims a Redis list to an inclusive index range. It supports zero-based and negative indexes, and deletes the key when the resulting list is empty.
Last updated
- Since
- 1.0.0
Syntax
LTRIM key start stopIn-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
BLMOVEBLMPOPBLPOPBRPOPLINDEXLINSERTLLENLMOVE