Redis
Redis is an in-memory database that persist on disk. The data model is key-value,
but many different kind of values are supported: String, Lists, Sets, Sorted Set,
Hashes, HyperLogLog, Bitmaps.http://redis.io
Install
- Download, extract and compile Redis with:
$ wget http://download.redis.io/releases/redis-3.0.5.tar.gz
$ tar xzf redis-3.0.5.tar.gz
$ cd redis-3.0.5
$ make
Use
Playing with Redis
% cd src
% ./redis-cli
redis> ping
PONG
redis> set foo bar
OK
redis> get foo
“bar”
redis> incr mycounter
(integer) 1
redis> incr mycounter
(integer) 2
redis>
Analyze
- size of source code, 1.3MB
- total lines of code, 58185
- allocate double memory size when append string