Redis Cheat Sheet/Increment integer

Atomically increment a counter.

Section: Strings

Increment integer

bash
bash
INCR page:view:123

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Strings
Increment by a specific value
Increase an integer counter by N.
OpenIn sheetbashsame section
Decrement integer
Atomically decrement a counter.
OpenIn sheetbashsame section
Increment floating-point value
Increase a floating-point number.
OpenIn sheetbashsame section
Set a string value
Write a string value.
OpenIn sheetbashsame section
Set value with TTL
Store a string and set expiry atomically.
OpenIn sheetbashsame section
Set only if key does not exist
Common lock-style pattern using NX and EX.
OpenIn sheetbashsame section