string , list , hash , set and sorted set
set <key name> <value>
set name "hiren"
get <key name>
get name #return "hiren"
getrange <key> <range>
getrange name 0 3 #return "hire"
setrange <key> <position> <value>
setrange name 5 RST
getset <key> <new value>
getset name "Rater Santo Tara"
mset <key> <value> <key> <value>
mset name "Rater Santo Tara" age 20
incr age ## increment age by 1
decr <key>
incrby <key> 5
decrby <key> 20
incrbyfloat <key> <float value>
setex <key> <time in second> <value>
setex name 4 hiren
setnx <key> <value>
msetnx <key> <value> <key> <value>
strlen <key>
lpush <list name or key > <value> <value>
rpush <key or list name > <value> <value>
lpushx <list name or the key > <value>
rpushx <list name or the key > <value>
llen <list name >
llen hiren
lrange <list name> <starting position> <ending position>
Tips : For grabbing whole list use starting position = 0 and ending position = -1
lpop <value>
rpop <value>
lrem <list name> 2 <value>
linsert <list name> before <existing value> <new value>
linsert <list name> after <existing value> <new value>
lindex <list name> <index no>
lset <list name> <index number> <new value>
ltrim <list name> <starting position> <ending position>
sort <list key>
sort <list key> limit <starting point> <ending point>
sort <list key> asc
sort <list key> desc
sort <list key name> alpha
hset <key> <subkey> <value>
hset hiren age 20
hget <key> <subkey>
hgetall <key>
hvals <key>
hkeys <key>
hexits <key> <subkey>
hincrby <key> <subkey>
hincrbyfloat <key> <subkey>
hlen <key>
hmget <key> <subkey> <subkey>
hmset <key> <subkey> <value> <subkey> <value>
hsetnx <key> <subkey> <value>
hdel <key> <subkey>
sadd <set name> <value> <value>
srem <set name> <value>
smembers <set name>
sismember <setname> <value>
scard <set name>
sranmember <set name>
spop <set name>
sdiff <set name> <set name>
sdiff <new set name> <set name> <set name>
sinter <set 1> <set 2>
sunion <set 1> <set 2>
sunionstore <new set > <set 1> <set 2>
smove <old set> <new set> <value>
keys *
keys hiren*
keys hire
exits <key name>
type <key name>
del <key name>
move <key name> <database number>
move hiren 2
select <database number>
select 1
expire <key name> <Second>
ttl <keyname> <secound>