Skip to content
masterclass Buddy

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 element

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • BLMOVE
  • BLMPOP
  • BLPOP
  • BRPOP
  • BRPOPLPUSH
  • LINDEX
  • LLEN
  • LMOVE

Source: LINSERT | Docs. Checked 2026-11-03.