Skip to content

warainelor/redis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

# GENERAL

redis-cli

redis-cli -h <host> -p <port> -a <password>

# KEY:VALUES

SET mykey "hello, redis!"

GET mykey

DEL mykey

# INCREMENTING

INCR mycounter

INCRBY mycounter 5

# TTL

SET mykey EX 10

TTL mykey

# LIST

LPUSH mylist "item1"

RPUSH mylist "item2"

LRANGE mylist 0 -1

LPOP mylist

RPOP mylist

# HASH

HSET myhash field1 "value1:

HGET myhash field1

HGETALL myhash

# SET

SADD myset "item1"

SMEMBERS myset

SISMEMBER myset "item1"

# SORTED SETS

ZADD myzset 1 "item1"

ZRANGE myzset 0 -1

# ADMINISTRATION

INFO

KEYS *

FLUSHALL

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages