Redis - studiofu/brain GitHub Wiki

Servers

run redis-server.exe on windows

Commands

GET

SET

set a a123
set b b123
append a 999

increase the count of the key and it's atomic

INCR

incr counter
incr counter
decr counter
incrby counter 10

expire after 120 seconds

EXPIRE 120

check the remaining time of the key

TTL

push to the list

RPUSH

LPUSH

LRANGE start end, example, LRANGE key 0 -1, -1 mean to the end of the list

add to set and remove from set

SADD

SREM '

Resources

Redis Usage

https://www.itcodemonkey.com/article/2208.html

⚠️ **GitHub.com Fallback** ⚠️