Increment counter
Atomically increment an integer counter
redis-cli INCRBY counter:hits 1
More redis commands
-
redis-cli PUBLISH events '{"type":"login","user":"alice"}'Publish a message to a Redis pub/sub channel
-
redis-cli SUBSCRIBE eventsSubscribe and listen to messages on a channel
-
redis-cli INFO replicationRole, connected replicas, replication lag
-
redis-cli BGSAVE && redis-cli LASTSAVETrigger background RDB save and check its timestamp
-
redis-cli -n 1 FLUSHDB ASYNCAsynchronously flush database index 1 only