Redis.io: Difference between revisions
Jump to navigation
Jump to search
(Created page with "http://redis.io/ ''Redis is an open source, BSD licensed, advanced key-value store. It is often referred to as a data structure server since keys can contain strings, hashes,...") |
No edit summary |
||
| Line 2: | Line 2: | ||
''Redis is an open source, BSD licensed, advanced key-value store. It is often referred to as a data structure server since keys can contain strings, hashes, lists, sets and sorted sets.'' |
''Redis is an open source, BSD licensed, advanced key-value store. It is often referred to as a data structure server since keys can contain strings, hashes, lists, sets and sorted sets.'' |
||
=Getting started with Redis= |
|||
[https://dzone.com/storage/assets/6105872-dzone-rc245-gettingstartedwithredis.pdf |refcard Getting started with Redis] |
|||
=Redis [[Docker]] Container= |
|||
Read https://hub.docker.com/_/redis/ |
|||
<pre> |
|||
docker run --name my-redis -d redis |
|||
</pre> |
|||
Start redis-cli |
|||
<pre> |
|||
docker run -it --link my-redis:redis --rm redis redis-cli -h redis -p 6379 |
|||
</pre> |
|||
Run commands |
|||
<pre> |
|||
help |
|||
SET name Alice |
|||
GET name |
|||
GETSET name Bob |
|||
GET name |
|||
MSET fruit apple cookie choc-chip |
|||
MGET cookie fruit |
|||
GET counter |
|||
INCR counter |
|||
GET counter |
|||
INCRBY counter 3 |
|||
GET counter |
|||
KEYS * |
|||
KEYS *o* |
|||
... |
|||
</pre> |
|||
Revision as of 12:07, 21 August 2017
Redis is an open source, BSD licensed, advanced key-value store. It is often referred to as a data structure server since keys can contain strings, hashes, lists, sets and sorted sets.
Getting started with Redis
|refcard Getting started with Redis
Redis Docker Container
Read https://hub.docker.com/_/redis/
docker run --name my-redis -d redis
Start redis-cli
docker run -it --link my-redis:redis --rm redis redis-cli -h redis -p 6379
Run commands
help SET name Alice GET name GETSET name Bob GET name MSET fruit apple cookie choc-chip MGET cookie fruit GET counter INCR counter GET counter INCRBY counter 3 GET counter KEYS * KEYS *o* ...