What is the INCRBY ?

Syntax

  • Time complexity: O(1)

...If the key does not exist, it is set toย 0ย before performing the operation
  • ํ•ด๋‹น ํ‚ค๊ฐ€ ์กด์žฌํ•˜์ง€ ์•Š์œผ๋ฉด, 0 ์œผ๋กœ ์„ค์ •๋จ

Examples

redis> SET mykey "10"
"OK"
redis> INCRBY mykey 5
(integer) 15
redis>

Reference

  • https://www.baeldung.com/java-redis-lettuce

  • http://redis.io/commands/incrby

  • https://redis.io/commands/incrby/

Last updated