http://try.redis.io/
Redis is Key-value storage, also known as NoSQL database, the key operation of Redis database is to store key-value data, retrieve value by key
1) storage, retrieval, deletion, self-increment set,get, DEL,INCR
> SET server:name "Fido"OK> GET server:name"Fido"> SET ConnectionsOK> INCR Connections(integer)> INCR Connections(integer)> DEL Connections(integer) 1> INCR Connections(integer) 1
2) key expires EXPIRE & TTL
#Redis can is told that aKeyShould onlyExist forA certain length ofTime. This isAccomplished withThe EXPIRE andTTL Commands. SETresource:lock "Redis Demo" EXPIRE resource:lock120
#This causes theKeyResource:lock tobe deletedinch -Seconds. Can test howLongAKeywould exist withThe TTL command. ItreturnsThe Number ofseconds until it'll be deleted. TTL Resource:lock= 113 //After 113s TTL resource:lock= -2
#The-2 forThe TTL ofTheKeymeans that theKeyDoes notexist (anymore). A-1 forThe TTL ofTheKeymeans that it'll never expire. Note thatifYouSETAKey, its TTL would be reset. SETResource:lock "Redis Demo1"EXPIRE Resource:lock -TTL Resource:lock= 119 SETResource:lock "Redis Demo2the TTL resource:lock= -1
3) sequence list Rpush, Lpush, Llen, Lrange, Lpop, and Rpop
4) Unordered collection Sadd, Srem, Sismember, Smembers and Sunion.
5) ordered set Zadd Zrange
6) hash Hset, Hgetall, Hmset, Hget, Hdel
Hincrby can perform a self-increment operation on a domain (field) inside a hash
Redis Tutorial-Basic operations