summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/AppendOnlyFileHowto.html40
-rw-r--r--doc/AuthCommand.html39
-rw-r--r--doc/Benchmarks.html129
-rw-r--r--doc/BgsaveCommand.html39
-rw-r--r--doc/CommandReference.html45
-rw-r--r--doc/Comparisons.html42
-rw-r--r--doc/Configuration.html38
-rw-r--r--doc/Credits.html38
-rw-r--r--doc/DbsizeCommand.html38
-rw-r--r--doc/DelCommand.html42
-rw-r--r--doc/DesignPatterns.html37
-rw-r--r--doc/ExistsCommand.html42
-rw-r--r--doc/ExpireCommand.html68
-rw-r--r--doc/FAQ.html70
-rw-r--r--doc/Features.html36
-rw-r--r--doc/FlushallCommand.html39
-rw-r--r--doc/FlushdbCommand.html39
-rw-r--r--doc/FromSqlToDataStructures.html37
-rw-r--r--doc/GetCommand.html39
-rw-r--r--doc/GetsetCommand.html40
-rw-r--r--doc/IncrCommand.html43
-rw-r--r--doc/InfoCommand.html50
-rw-r--r--doc/KeysCommand.html42
-rw-r--r--doc/LastsaveCommand.html39
-rw-r--r--doc/LindexCommand.html41
-rw-r--r--doc/LlenCommand.html41
-rw-r--r--doc/LpopCommand.html41
-rw-r--r--doc/LrangeCommand.html42
-rw-r--r--doc/LremCommand.html41
-rw-r--r--doc/LsetCommand.html39
-rw-r--r--doc/LtrimCommand.html47
-rw-r--r--doc/MgetCommand.html52
-rw-r--r--doc/MonitorCommand.html63
-rw-r--r--doc/MoveCommand.html42
-rw-r--r--doc/MsetCommand.html44
-rw-r--r--doc/ObjectHashMappers.html39
-rw-r--r--doc/Pipelining.html36
-rw-r--r--doc/ProgrammingExamples.html38
-rw-r--r--doc/ProtocolSpecification.html142
-rw-r--r--doc/QuickStart.html78
-rw-r--r--doc/QuitCommand.html38
-rw-r--r--doc/README.html110
-rw-r--r--doc/RandomkeyCommand.html39
-rw-r--r--doc/Redis0100ChangeLog.html67
-rw-r--r--doc/Redis0900ChangeLog.html56
-rw-r--r--doc/RenameCommand.html39
-rw-r--r--doc/RenamenxCommand.html42
-rw-r--r--doc/ReplicationHowto.html41
-rw-r--r--doc/ReplyTypes.html42
-rw-r--r--doc/RoadMap.html38
-rw-r--r--doc/RpoplpushCommand.html44
-rw-r--r--doc/RpushCommand.html40
-rw-r--r--doc/SaddCommand.html42
-rw-r--r--doc/SaveCommand.html39
-rw-r--r--doc/ScardCommand.html41
-rw-r--r--doc/SdiffCommand.html45
-rw-r--r--doc/SdiffstoreCommand.html39
-rw-r--r--doc/SelectCommand.html39
-rw-r--r--doc/SetCommand.html39
-rw-r--r--doc/SetnxCommand.html42
-rw-r--r--doc/ShutdownCommand.html39
-rw-r--r--doc/SideBar.html36
-rw-r--r--doc/SinterCommand.html40
-rw-r--r--doc/SinterstoreCommand.html39
-rw-r--r--doc/SismemberCommand.html42
-rw-r--r--doc/SlaveofCommand.html41
-rw-r--r--doc/SmembersCommand.html39
-rw-r--r--doc/SmoveCommand.html44
-rw-r--r--doc/SortCommand.html63
-rw-r--r--doc/Speed.html38
-rw-r--r--doc/SremCommand.html42
-rw-r--r--doc/SunionCommand.html40
-rw-r--r--doc/SunionstoreCommand.html39
-rw-r--r--doc/SupportedLanguages.html59
-rw-r--r--doc/SupportedPlatforms.html37
-rw-r--r--doc/TemplateCommand.html38
-rw-r--r--doc/TtlCommand.html38
-rw-r--r--doc/TwitterAlikeExample.html250
-rw-r--r--doc/TypeCommand.html44
-rw-r--r--doc/UnstableSource.html39
-rw-r--r--doc/ZaddCommand.html44
-rw-r--r--doc/ZcardCommand.html42
-rw-r--r--doc/ZrangeCommand.html42
-rw-r--r--doc/ZrangebyscoreCommand.html39
-rw-r--r--doc/ZremCommand.html41
-rw-r--r--doc/ZscoreCommand.html41
-rw-r--r--doc/index.html40
87 files changed, 4195 insertions, 0 deletions
diff --git a/doc/AppendOnlyFileHowto.html b/doc/AppendOnlyFileHowto.html
new file mode 100644
index 000000000..b30a27cae
--- /dev/null
+++ b/doc/AppendOnlyFileHowto.html
@@ -0,0 +1,40 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>AppendOnlyFileHowto: Contents</b><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#General Information">General Information</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Log rewriting">Log rewriting</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Wait... but how does this work?">Wait... but how does this work?</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#How durable is the append only file?">How durable is the append only file?</a>
+ </div>
+
+ <h1 class="wikiname">AppendOnlyFileHowto</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+ &iuml;&raquo;&iquest;= Append Only File HOWTO =<h2><a name="General Information">General Information</a></h2>Append only file is an alternative durability option for Redis. What this mean? Let's start with some fact:<br/><br/><ul><li> For default Redis saves snapshots of the dataset on disk, in a binary file called dump.rdb (by default at least). For instance you can configure Redis to save the dataset every 60 seconds if there are at least 100 changes in the dataset, or every 1000 seconds if there is at least a single change in the dataset. This is known as &quot;Snapshotting&quot;.</li><li> Snapshotting is not very durable. If your computer running Redis stops, your power line fails, or you write killall -9 redis-server for a mistake, the latest data written on Redis will get lost. There are applications where this is not a big deal. There are applications where this is not acceptable and Redis <b>was</b> not an option for this applications.</li></ul>
+What is the solution? To use append only file as alternative to snapshotting. How it works?<br/><br/><ul><li> It is an 1.1 only feature.</li><li> You have to turn it on editing the configuration file. Just make sure you have &quot;appendonly yes&quot; somewhere.</li><li> Append only files work this way: every time Redis receive a command that changes the dataset (for instance a SET or LPUSH command) it appends this command in the append only file. When you restart Redis it will first <b>re-play</b> the append only file to rebuild the state.</li></ul>
+<h2><a name="Log rewriting">Log rewriting</a></h2>As you can guess... the append log file gets bigger and bigger, every time there is a new operation changing the dataset. Even if you set always the same key &quot;mykey&quot; to the values of &quot;1&quot;, &quot;2&quot;, &quot;3&quot;, ... up to 10000000000 in the end you'll have just a single key in the dataset, just a few bytes! but how big will be the append log file? Very very big.<br/><br/>So Redis supports an interesting feature: it is able to rebuild the append log file, in background, without to stop processing client commands. The key is the command <a href="BGREWRITEAOF.html">BGREWRITEAOF</a>. This command basically is able to use the dataset in memory in order to rewrite the shortest sequence of commands able to rebuild the exact dataset that is currently in memory.<br/><br/>So from time to time when the log gets too big, try this command. It's safe as if it fails you will not lost your old log (but you can make a backup copy given that currently 1.1 is still in beta!).<h2><a name="Wait... but how does this work?">Wait... but how does this work?</a></h2>Basically it uses the same fork() copy-on-write trick that snapshotting already uses. This is how the algorithm works:<br/><br/><ul><li> Redis forks, so now we have a child and a parent.</li><li> The child starts writing the new append log file in a temporary file.</li><li> The parent accumulates all the new changes in an in-memory buffer.</li><li> When the child finished to rewrite the file, the parent gets a signal, and append the in-memory buffer at the end of the file generated by the child.</li><li> Profit! Now Redis atomically renames the old file into the new one, and starts appending new data into the new file.</li></ul>
+<h2><a name="How durable is the append only file?">How durable is the append only file?</a></h2>Check redis.conf, you can configure how many times Redis will fsync() data on disk. There are three options:<br/><br/><ul><li> Fsync() every time a new command is appended to the append log file. Very very slow, very safe.</li><li> Fsync() one time every second. Fast enough, and you can lose 1 second of data if there is a disaster.</li><li> Never fsync(), just put your data in the hands of the Operating System. The faster and unsafer method.</li></ul>
+Warning: by default Redis will fsync() after <b>every command</b>! This is because the Redis authors want to ship a default configuration that is the safest pick. But the best compromise for most datasets is to fsync() one time every second.
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/AuthCommand.html b/doc/AuthCommand.html
new file mode 100644
index 000000000..a326a8456
--- /dev/null
+++ b/doc/AuthCommand.html
@@ -0,0 +1,39 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>AuthCommand: Contents</b><br>&nbsp;&nbsp;<a href="#AUTH _password_">AUTH _password_</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Return value">Return value</a>
+ </div>
+
+ <h1 class="wikiname">AuthCommand</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+ <h1><a name="AUTH _password_">AUTH _password_</a></h1><blockquote>Request for authentication in a password protected Redis server.A Redis server can be instructed to require a password before to allow clientsto issue commands. This is done using the <i>requirepass</i> directive in theRedis configuration file.</blockquote>
+<blockquote>If the password given by the client is correct the server replies withan OK status code reply and starts accepting commands from the client.Otherwise an error is returned and the clients needs to try a new password.Note that for the high performance nature of Redis it is possible to trya lot of passwords in parallel in very short time, so make sure to generatea strong and very long password so that this attack is infeasible.</blockquote>
+<h2><a name="Return value">Return value</a></h2><a href="ReplyTypes.html">Status code reply</a>
+
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/Benchmarks.html b/doc/Benchmarks.html
new file mode 100644
index 000000000..53f8bb44d
--- /dev/null
+++ b/doc/Benchmarks.html
@@ -0,0 +1,129 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>Benchmarks: Contents</b><br>&nbsp;&nbsp;<a href="#How Fast is Redis?">How Fast is Redis?</a><br>&nbsp;&nbsp;<a href="#Latency percentiles">Latency percentiles</a>
+ </div>
+
+ <h1 class="wikiname">Benchmarks</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+ <h1><a name="How Fast is Redis?">How Fast is Redis?</a></h1>Redis includes the <code name="code" class="python">redis-benchmark</code> utility that simulates SETs/GETs done by N clients at the same time sending M total queries (it is similar to the Apache's <code name="code" class="python">ab</code> utility). Below you'll find the full output of the benchmark executed against a Linux box.<br/><br/><ul><li> The test was done with 50 simultaneous clients performing 100000 requests.</li><li> The value SET and GET is a 256 bytes string.</li><li> The Linux box is running <b>Linux 2.6</b>, it's <b>Xeon X3320 2.5Ghz</b>.</li><li> Text executed using the loopback interface (127.0.0.1).</li></ul>
+Results: <b>about 110000 SETs per second, about 81000 GETs per second.</b><h1><a name="Latency percentiles">Latency percentiles</a></h1><pre class="codeblock python" name="code">
+./redis-benchmark -n 100000
+
+====== SET ======
+ 100007 requests completed in 0.88 seconds
+ 50 parallel clients
+ 3 bytes payload
+ keep alive: 1
+
+58.50% &lt;= 0 milliseconds
+99.17% &lt;= 1 milliseconds
+99.58% &lt;= 2 milliseconds
+99.85% &lt;= 3 milliseconds
+99.90% &lt;= 6 milliseconds
+100.00% &lt;= 9 milliseconds
+114293.71 requests per second
+
+====== GET ======
+ 100000 requests completed in 1.23 seconds
+ 50 parallel clients
+ 3 bytes payload
+ keep alive: 1
+
+43.12% &lt;= 0 milliseconds
+96.82% &lt;= 1 milliseconds
+98.62% &lt;= 2 milliseconds
+100.00% &lt;= 3 milliseconds
+81234.77 requests per second
+
+====== INCR ======
+ 100018 requests completed in 1.46 seconds
+ 50 parallel clients
+ 3 bytes payload
+ keep alive: 1
+
+32.32% &lt;= 0 milliseconds
+96.67% &lt;= 1 milliseconds
+99.14% &lt;= 2 milliseconds
+99.83% &lt;= 3 milliseconds
+99.88% &lt;= 4 milliseconds
+99.89% &lt;= 5 milliseconds
+99.96% &lt;= 9 milliseconds
+100.00% &lt;= 18 milliseconds
+68458.59 requests per second
+
+====== LPUSH ======
+ 100004 requests completed in 1.14 seconds
+ 50 parallel clients
+ 3 bytes payload
+ keep alive: 1
+
+62.27% &lt;= 0 milliseconds
+99.74% &lt;= 1 milliseconds
+99.85% &lt;= 2 milliseconds
+99.86% &lt;= 3 milliseconds
+99.89% &lt;= 5 milliseconds
+99.93% &lt;= 7 milliseconds
+99.96% &lt;= 9 milliseconds
+100.00% &lt;= 22 milliseconds
+100.00% &lt;= 208 milliseconds
+88109.25 requests per second
+
+====== LPOP ======
+ 100001 requests completed in 1.39 seconds
+ 50 parallel clients
+ 3 bytes payload
+ keep alive: 1
+
+54.83% &lt;= 0 milliseconds
+97.34% &lt;= 1 milliseconds
+99.95% &lt;= 2 milliseconds
+99.96% &lt;= 3 milliseconds
+99.96% &lt;= 4 milliseconds
+100.00% &lt;= 9 milliseconds
+100.00% &lt;= 208 milliseconds
+71994.96 requests per second
+</pre>Notes: changing the payload from 256 to 1024 or 4096 bytes does not change the numbers significantly (but reply packets are glued together up to 1024 bytes so GETs may be slower with big payloads). The same for the number of clients, from 50 to 256 clients I got the same numbers. With only 10 clients it starts to get a bit slower.<br/><br/>You can expect different results from different boxes. For example a low profile box like <b>Intel core duo T5500 clocked at 1.66Ghz running Linux 2.6</b> will output the following:
+<pre class="codeblock python python" name="code">
+ ./redis-benchmark -q -n 100000
+SET: 53684.38 requests per second
+GET: 45497.73 requests per second
+INCR: 39370.47 requests per second
+LPUSH: 34803.41 requests per second
+LPOP: 37367.20 requests per second
+</pre>Another one using a 64 bit box, a Xeon L5420 clocked at 2.5 Ghz:<br/><br/><pre class="codeblock python python python" name="code">
+ ./redis-benchmark -q -n 100000
+PING: 111731.84 requests per second
+SET: 108114.59 requests per second
+GET: 98717.67 requests per second
+INCR: 95241.91 requests per second
+LPUSH: 104712.05 requests per second
+LPOP: 93722.59 requests per second
+</pre>
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/BgsaveCommand.html b/doc/BgsaveCommand.html
new file mode 100644
index 000000000..5fab9485e
--- /dev/null
+++ b/doc/BgsaveCommand.html
@@ -0,0 +1,39 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>BgsaveCommand: Contents</b><br>&nbsp;&nbsp;<a href="#BGSAVE">BGSAVE</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Return value">Return value</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#See also">See also</a>
+ </div>
+
+ <h1 class="wikiname">BgsaveCommand</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+ <h1><a name="BGSAVE">BGSAVE</a></h1>
+<blockquote>Save the DB in background. The OK code is immediately returned.Redis forks, the parent continues to server the clients, the childsaves the DB on disk then exit. A client my be able to check if theoperation succeeded using the <a href="LastsaveCommand.html">LASTSAVE</a> command.</blockquote>
+<h2><a name="Return value">Return value</a></h2><a href="ReplyTypes.html">Status code reply</a><h2><a name="See also">See also</a></h2>
+<ul><li> <a href="SaveCommand.html">SAVE</a></li><li> <a href="ShutdownCommand.html">SHUTDOWN</a></li></ul>
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/CommandReference.html b/doc/CommandReference.html
new file mode 100644
index 000000000..b1074c6e0
--- /dev/null
+++ b/doc/CommandReference.html
@@ -0,0 +1,45 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>CommandReference: Contents</b><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Connection handling">Connection handling</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Commands operating on string values">Commands operating on string values</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Commands operating on the key space">Commands operating on the key space</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Commands operating on lists">Commands operating on lists</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Commands operating on sets">Commands operating on sets</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Commands operating on sorted sets (zsets, Redis version &gt;">Commands operating on sorted sets (zsets, Redis version &gt;</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Multiple databases handling commands">Multiple databases handling commands</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Sorting">Sorting</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Persistence control commands">Persistence control commands</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Remote server control commands">Remote server control commands</a>
+ </div>
+
+ <h1 class="wikiname">CommandReference</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+ &iuml;&raquo;&iquest;= Redis Command Reference =<br/><br/>Every command name links to a specific wiki page describing the behavior of the command.<h2><a name="Connection handling">Connection handling</a></h2><ul><li> <a href="QuitCommand.html">QUIT</a> <code name="code" class="python">close the connection</code></li><li> <a href="AuthCommand.html">AUTH</a> <code name="code" class="python">simple password authentication if enabled</code></li></ul>
+<h2><a name="Commands operating on string values">Commands operating on string values</a></h2><ul><li> <a href="SetCommand.html">SET</a> <i>key</i> <i>value</i> <code name="code" class="python">set a key to a string value</code></li><li> <a href="GetCommand.html">GET</a> <i>key</i> <code name="code" class="python">return the string value of the key</code></li><li> <a href="GetsetCommand.html">GETSET</a> <i>key</i> <i>value</i> <code name="code" class="python">set a key to a string returning the old value of the key</code></li><li> <a href="MgetCommand.html">MGET</a> <i>key1</i> <i>key2</i> ... <i>keyN</i> <code name="code" class="python">multi-get, return the strings values of the keys</code></li><li> <a href="SetnxCommand.html">SETNX</a> <i>key</i> <i>value</i> <code name="code" class="python">set a key to a string value if the key does not exist</code></li><li> <a href="MsetCommand.html">MSET</a> <i>key1</i> <i>value1</i> <i>key2</i> <i>value2</i> ... <i>keyN</i> <i>valueN</i> <code name="code" class="python">set a multiple keys to multiple values in a single atomic operation</code></li><li> <a href="MsetCommand.html">MSETNX</a> <i>key1</i> <i>value1</i> <i>key2</i> <i>value2</i> ... <i>keyN</i> <i>valueN</i> <code name="code" class="python">set a multiple keys to multiple values in a single atomic operation if none of the keys already exist</code></li><li> <a href="IncrCommand.html">INCR</a> <i>key</i> <code name="code" class="python">increment the integer value of key</code></li><li> <a href="IncrCommand.html">INCRBY</a> <i>key</i> <i>integer</i><code name="code" class="python"> increment the integer value of key by integer</code></li><li> <a href="IncrCommand.html">DECR</a> <i>key</i> <code name="code" class="python">decrement the integer value of key</code></li><li> <a href="IncrCommand.html">DECRBY</a> <i>key</i> <i>integer</i> <code name="code" class="python">decrement the integer value of key by integer</code></li><li> <a href="ExistsCommand.html">EXISTS</a> <i>key</i> <code name="code" class="python">test if a key exists</code></li><li> <a href="DelCommand.html">DEL</a> <i>key</i> <code name="code" class="python">delete a key</code></li><li> <a href="TypeCommand.html">TYPE</a> <i>key</i> <code name="code" class="python">return the type of the value stored at key</code></li></ul>
+<h2><a name="Commands operating on the key space">Commands operating on the key space</a></h2><ul><li> <a href="KeysCommand.html">KEYS</a> <i>pattern</i> <code name="code" class="python">return all the keys matching a given pattern</code></li><li> <a href="RandomkeyCommand.html">RANDOMKEY</a> <code name="code" class="python">return a random key from the key space</code></li><li> <a href="RenameCommand.html">RENAME</a> <i>oldname</i> <i>newname</i> <code name="code" class="python">rename the old key in the new one, destroing the newname key if it already exists</code></li><li> <a href="RenamenxCommand.html">RENAMENX</a> <i>oldname</i> <i>newname</i> <code name="code" class="python">rename the old key in the new one, if the newname key does not already exist</code></li><li> <a href="DbsizeCommand.html">DBSIZE</a> <code name="code" class="python">return the number of keys in the current db</code></li><li> <a href="ExpireCommand.html">EXPIRE</a> <code name="code" class="python">set a time to live in seconds on a key</code></li><li> <a href="TtlCommand.html">TTL</a> <code name="code" class="python">get the time to live in seconds of a key</code></li></ul>
+<h2><a name="Commands operating on lists">Commands operating on lists</a></h2><ul><li> <a href="RpushCommand.html">RPUSH</a> <i>key</i> <i>value</i> <code name="code" class="python">Append an element to the tail of the List value at key</code></li><li> <a href="RpushCommand.html">LPUSH</a> <i>key</i> <i>value</i> <code name="code" class="python">Append an element to the head of the List value at key</code></li><li> <a href="LlenCommand.html">LLEN</a> <i>key</i> <code name="code" class="python">Return the length of the List value at key</code></li><li> <a href="LrangeCommand.html">LRANGE</a> <i>key</i> <i>start</i> <i>end</i> <code name="code" class="python">Return a range of elements from the List at key</code></li><li> <a href="LtrimCommand.html">LTRIM</a> <i>key</i> <i>start</i> <i>end</i> <code name="code" class="python">Trim the list at key to the specified range of elements</code></li><li> <a href="LindexCommand.html">LINDEX</a> <i>key</i> <i>index</i> <code name="code" class="python">Return the element at index position from the List at key</code></li><li> <a href="LsetCommand.html">LSET</a> <i>key</i> <i>index</i> <i>value</i> <code name="code" class="python">Set a new value as the element at index position of the List at key</code></li><li> <a href="LremCommand.html">LREM</a> <i>key</i> <i>count</i> <i>value</i> <code name="code" class="python">Remove the first-N, last-N, or all the elements matching value from the List at key</code></li><li> <a href="LpopCommand.html">LPOP</a> <i>key</i> <code name="code" class="python">Return and remove (atomically) the first element of the List at key</code></li><li> <a href="LpopCommand.html">RPOP</a> <i>key</i> <code name="code" class="python">Return and remove (atomically) the last element of the List at key</code></li><li> <a href="RpoplpushCommand.html">RPOPLPUSH</a> <i>srckey</i> <i>dstkey</i> <code name="code" class="python">Return and remove (atomically) the last element of the source List stored at _srckey_ and push the same element to the destination List stored at _dstkey_</code></li></ul>
+<h2><a name="Commands operating on sets">Commands operating on sets</a></h2><ul><li> <a href="SaddCommand.html">SADD</a> <i>key</i> <i>member</i> <code name="code" class="python">Add the specified member to the Set value at key</code></li><li> <a href="SremCommand.html">SREM</a> <i>key</i> <i>member</i> <code name="code" class="python">Remove the specified member from the Set value at key</code></li><li> <a href="SpopCommand.html">SPOP</a> <i>key</i> <code name="code" class="python">Remove and return (pop) a random element from the Set value at key</code></li><li> <a href="SmoveCommand.html">SMOVE</a> <i>srckey</i> <i>dstkey</i> <i>member</i> <code name="code" class="python">Move the specified member from one Set to another atomically</code></li><li> <a href="ScardCommand.html">SCARD</a> <i>key</i> <code name="code" class="python">Return the number of elements (the cardinality) of the Set at key</code></li><li> <a href="SismemberCommand.html">SISMEMBER</a> <i>key</i> <i>member</i> <code name="code" class="python">Test if the specified value is a member of the Set at key</code></li><li> <a href="SinterCommand.html">SINTER</a> <i>key1</i> <i>key2</i> ... <i>keyN</i> <code name="code" class="python">Return the intersection between the Sets stored at key1, key2, ..., keyN</code></li><li> <a href="SinterstoreCommand.html">SINTERSTORE</a> <i>dstkey</i> <i>key1</i> <i>key2</i> ... <i>keyN</i> <code name="code" class="python">Compute the intersection between the Sets stored at key1, key2, ..., keyN, and store the resulting Set at dstkey</code></li><li> <a href="SunionCommand.html">SUNION</a> <i>key1</i> <i>key2</i> ... <i>keyN</i> <code name="code" class="python">Return the union between the Sets stored at key1, key2, ..., keyN</code></li><li> <a href="SunionstoreCommand.html">SUNIONSTORE</a> <i>dstkey</i> <i>key1</i> <i>key2</i> ... <i>keyN</i> <code name="code" class="python">Compute the union between the Sets stored at key1, key2, ..., keyN, and store the resulting Set at dstkey</code></li><li> <a href="SdiffCommand.html">SDIFF</a> <i>key1</i> <i>key2</i> ... <i>keyN</i> <code name="code" class="python">Return the difference between the Set stored at key1 and all the Sets key2, ..., keyN</code></li><li> <a href="SdiffstoreCommand.html">SDIFFSTORE</a> <i>dstkey</i> <i>key1</i> <i>key2</i> ... <i>keyN</i> <code name="code" class="python">Compute the difference between the Set key1 and all the Sets key2, ..., keyN, and store the resulting Set at dstkey</code></li><li> <a href="SmembersCommand.html">SMEMBERS</a> <i>key</i> <code name="code" class="python">Return all the members of the Set value at key</code></li><li> <a href="SrandmemberCommand.html">SRANDMEMBER</a> <i>key</i> <code name="code" class="python">Return a random member of the Set value at key</code></li></ul>
+<h2><a name="Commands operating on sorted sets (zsets, Redis version &gt;">Commands operating on sorted sets (zsets, Redis version &gt;</a></h2> 1.1) ==<br/><br/><ul><li> <a href="ZaddCommand.html">ZADD</a> <i>key</i> <i>score</i> <i>member</i> <code name="code" class="python">Add the specified member to the Set value at key or update the score if it already exist</code></li><li> <a href="ZremCommand.html">ZREM</a> <i>key</i> <i>member</i> <code name="code" class="python">Remove the specified member from the Set value at key</code></li><li> <a href="ZrangeCommand.html">ZRANGE</a> <i>key</i> <i>start</i> <i>end</i> <code name="code" class="python">Return a range of elements from the sorted set at key</code></li><li> <a href="ZrangeCommand.html">ZREVRANGE</a> <i>key</i> <i>start</i> <i>end</i> <code name="code" class="python">Return a range of elements from the sorted set at key, exactly like ZRANGE, but the sorted set is ordered in traversed in reverse order, from the greatest to the smallest score</code></li><li> <a href="ZrangebyscoreCommand.html">ZRANGEBYSCORE</a> <i>key</i> <i>min</i> <i>max</i> <code name="code" class="python">Return all the elements with score &gt;= min and score &lt;= max (a range query) from the sorted set</code></li><li> <a href="ZcardCommand.html">ZCARD</a> <i>key</i> <code name="code" class="python">Return the cardinality (number of elements) of the sorted set at key</code></li><li> <a href="ZscoreCommand.html">ZSCORE</a> <i>key</i> <i>element</i> <code name="code" class="python">Return the score associated with the specified element of the sorted set at key</code></li></ul>
+<h2><a name="Multiple databases handling commands">Multiple databases handling commands</a></h2><ul><li> <a href="SelectCommand.html">SELECT</a> <i>index</i> <code name="code" class="python">Select the DB having the specified index</code></li><li> <a href="MoveCommand.html">MOVE</a> <i>key</i> <i>dbindex</i> <code name="code" class="python">Move the key from the currently selected DB to the DB having as index dbindex</code></li><li> <a href="FlushdbCommand.html">FLUSHDB</a> <code name="code" class="python">Remove all the keys of the currently selected DB</code></li><li> <a href="FlushallCommand.html">FLUSHALL</a> <code name="code" class="python">Remove all the keys from all the databases</code></li></ul>
+<h2><a name="Sorting">Sorting</a></h2><ul><li> <a href="SortCommand.html">SORT</a> <i>key</i> BY <i>pattern</i> LIMIT <i>start</i> <i>end</i> GET <i>pattern</i> ASC|DESC ALPHA <code name="code" class="python">Sort a Set or a List accordingly to the specified parameters</code></li></ul>
+<h2><a name="Persistence control commands">Persistence control commands</a></h2><ul><li> <a href="SaveCommand.html">SAVE</a> <code name="code" class="python">Synchronously save the DB on disk</code></li><li> <a href="BgsaveCommand.html">BGSAVE</a> <code name="code" class="python">Asynchronously save the DB on disk</code></li><li> <a href="LastsaveCommand.html">LASTSAVE</a> <code name="code" class="python">Return the UNIX time stamp of the last successfully saving of the dataset on disk</code></li><li> <a href="ShutdownCommand.html">SHUTDOWN</a> <code name="code" class="python">Synchronously save the DB on disk, then shutdown the server</code></li></ul>
+<h2><a name="Remote server control commands">Remote server control commands</a></h2><ul><li> <a href="InfoCommand.html">INFO</a> <code name="code" class="python">Provide information and statistics about the server</code></li><li> <a href="MonitorCommand.html">MONITOR</a> <code name="code" class="python">Dump all the received requests in real time</code></li><li> <a href="SlaveofCommand.html">SLAVEOF</a> <code name="code" class="python">Change the replication settings</code></li></ul>
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/Comparisons.html b/doc/Comparisons.html
new file mode 100644
index 000000000..25e6699ef
--- /dev/null
+++ b/doc/Comparisons.html
@@ -0,0 +1,42 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>Comparisons: Contents</b><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Memcached">Memcached</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Tokyo Cabinet / Toyo Tyrant">Tokyo Cabinet / Toyo Tyrant</a>
+ </div>
+
+ <h1 class="wikiname">Comparisons</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+ if your are asking yourself how is Redis different fom other key-value stores here you will find it compared to some of the most popular contendors (all great software) in this category. <h2><a name="Memcached">Memcached</a></h2><ul><li> Memcached is not persistent, it just holds everything in memory without saving since its main goal is to be used as a cache, while Redis is <a href="Persistence.html">persistent</a>.</li></ul>
+<ul><li> Like memcached Redis uses a key-value model, but while keys can just be strings, values in Redis can be <a href="Lists.html">Lists</a>, <a href="Sets.html">Sets</a> or <a href="OrderedSets.html">OrderedSets</a> and complex operations like intersections, set/get n-th element of lists, pop/push of elements, can be performed against sets and lists.</li></ul>
+<h2><a name="Tokyo Cabinet / Toyo Tyrant">Tokyo Cabinet / Toyo Tyrant</a></h2>Redis and Tokyo Cabinet can be used for the same applications, but actually they are <i>very different</i> beasts. If you read Twitter messages of people involved in scalable things both products are reported to work well, but surely there are times where one or the other can be the best choice.<br/><br/><ul><li> Tokyo Cabinet writes synchronously on disk, Redis takes the whole dataset on memory and writes on disk asynchronously. Tokyo Cabinet is safer and probably a better idea if your dataset is going to be bigger than RAM, but Redis is faster (note that Redis supports master-slave replication that is trivial to setup, so you are safe anyway if you want a setup where data can't be lost even after a disaster). </li></ul>
+<ul><li> Redis supports higher level operations and data structures. Tokyo Cabinet supports a kind of database that is able to organize data into rows with named fields (in a way very similar to Berkeley DB) but can't do things like server side List and Set operations Redis is able to do: pushing or popping from Lists in an atomic way, in O(1) time complexity, server side Set intersections, Sorting of schema free data in complex ways (By the way TC supports sorting in the table-based database format). Redis on the other hand does not support the abstraction of tables with fields, the idea is that you can build this stuff in software easily if you really need a table-alike approach. </li></ul>
+<ul><li> Tokyo Cabinet does not implement a networking layer. You have to use a networking layer called Tokyo Tyrant that interfaces to Tokyo Cabinet so you can talk to Tokyo Cabinet in a client-server fashion. In Redis the networking support is built-in inside the server, and is basically the only interface between the external world and the dataset. </li></ul>
+<ul><li> Redis is reported to be much faster, especially if you plan to access Tokyo Cabinet via Tokyo Tyrant. Here I can only say that with Redis you can expect 100,000 operations/seconds with a normal Linux box and 50 concurrent clients. You should test Redis, Tokyo, and the other alternatives with your specific work load to get a feeling about performances for your application. </li></ul>
+<ul><li> Redis is not an on-disk DB engine like Tokyo: the latter can be used as a fast DB engine in your C project without the networking overhead just linking to the library. Still in many scalable applications you need multiple servers talking with multiple clients, so the client-server model is almost always needed, this is why in Redis this is built-in. </li></ul>
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/Configuration.html b/doc/Configuration.html
new file mode 100644
index 000000000..91d15fca3
--- /dev/null
+++ b/doc/Configuration.html
@@ -0,0 +1,38 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>Configuration: Contents</b>
+ </div>
+
+ <h1 class="wikiname">Configuration</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+ The <code name="code" class="python">redis.conf</code> file included in the source code distribution is a starting point, you should be able to modify it in order do adapt it to your needs without troubles reading the comments inside the file.<br/><br/>In order to start Redis using a configuration file just pass the file name as the sole argument when starting the server:<br/><br/><pre class="codeblock python" name="code">
+$ ./redis-server redis.conf
+</pre>
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/Credits.html b/doc/Credits.html
new file mode 100644
index 000000000..fefc44400
--- /dev/null
+++ b/doc/Credits.html
@@ -0,0 +1,38 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>Credits: Contents</b><br>&nbsp;&nbsp;<a href="#Credits">Credits</a>
+ </div>
+
+ <h1 class="wikiname">Credits</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+ <h1><a name="Credits">Credits</a></h1><ul><li> The Redis server was designed and written by <a href="http://invece.org" target="_blank">Salvatore Sanfilippo (aka antirez)</a></li><li> <a href="http://brainspl.at/" target="_blank">Ezra Zygmuntowicz (aka ezmobius)</a> - Ruby client lib initial version and hacking</li><li> <a href="http://qix.it" target="_blank">Ludovico Magnocavallo (aka ludo)</a> - Python clinet lib</li><li> <a href="http://www.adroll.com/" target="_blank">Valentino Volonghi of Adroll</a> - Erlang client lib</li><li> <b>brettbender</b> - found and fixed a bug in sds.c that caused the server to crash at least on 64 bit systems, and anyway to be buggy since we used the same vararg thing against vsprintf without to call va_start and va_end every time.</li><li> <a href="http://www.rot13.org/~dpavlin" target="_blank">Dobrica Pavlinusic</a> - Perl client lib</li><li> Brian Hammond - AUTH command implementation, C++ client lib</li><li> <a href="http://www.clorophilla.net/" target="_blank">Daniele Alessandri</a> - Lua client lib</li><li> Corey Stup - C99 cleanups</li><li> Taylor Weibley - Ruby client improvements</li><li> Bob Potter - Rearrange redisObject struct to reduce memory usage in 64bit environments</li><li> Luca Guidi and Brian McKinney - Ruby client improvements</li><li> Aman Gupta - SDIFF / SDIFFSTORE, other Set operations improvements, ability to disable clients timeout.</li><li> Diego Rosario Brogna - Code and ideas about dumping backtrace on sigsegv and similar error conditions.</li></ul>
+p.s. sorry to take this file in sync is hard in this early days. Please drop me an email if I forgot to add your name here!
+
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/DbsizeCommand.html b/doc/DbsizeCommand.html
new file mode 100644
index 000000000..2c3e796e1
--- /dev/null
+++ b/doc/DbsizeCommand.html
@@ -0,0 +1,38 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>DbsizeCommand: Contents</b><br>&nbsp;&nbsp;<a href="#DBSIZE">DBSIZE</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Return value">Return value</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#See also">See also</a>
+ </div>
+
+ <h1 class="wikiname">DbsizeCommand</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+ <h1><a name="DBSIZE">DBSIZE</a></h1><blockquote>Return the number of keys in the currently selected database.</blockquote>
+<h2><a name="Return value">Return value</a></h2><a href="ReplyTypes.html">Integer reply</a><h2><a name="See also">See also</a></h2>
+<ul><li> <a href="SelectCommand.html">SELECT</a></li><li> <a href="InfoCommand.html">INFO</a></li></ul>
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/DelCommand.html b/doc/DelCommand.html
new file mode 100644
index 000000000..3d709696f
--- /dev/null
+++ b/doc/DelCommand.html
@@ -0,0 +1,42 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>DelCommand: Contents</b><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Return value">Return value</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#See also">See also</a>
+ </div>
+
+ <h1 class="wikiname">DelCommand</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+ &iuml;&raquo;&iquest;= DEL <i>key1</i> <i>key2</i> ... <i>keyN</i> =
+<i>Time complexity: O(1)</i><blockquote>Remove the specified keys. If a given key does not existno operation is performed for this key. The commnad returns the number ofkeys removed.</blockquote>
+<h2><a name="Return value">Return value</a></h2><a href="ReplyTypes.html">Integer reply</a>, specifically:<br/><br/><pre class="codeblock python" name="code">
+an integer greater than 0 if one or more keys were removed
+0 if none of the specified key existed
+</pre><h2><a name="See also">See also</a></h2>
+<ul><li> <a href="SetCommand.html">SET</a></li><li> <a href="GetCommand.html">GET</a></li><li> <a href="ExistsCommand.html">EXISTS</a></li><li> <a href="LremCommand.html">LREM</a></li></ul>
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/DesignPatterns.html b/doc/DesignPatterns.html
new file mode 100644
index 000000000..411739f1a
--- /dev/null
+++ b/doc/DesignPatterns.html
@@ -0,0 +1,37 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>DesignPatterns: Contents</b>
+ </div>
+
+ <h1 class="wikiname">DesignPatterns</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+ Use random keys instead of incremental keys in order to avoid a single-key that gets incremented by many servers. This can can't be distributed among servers.
+
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/ExistsCommand.html b/doc/ExistsCommand.html
new file mode 100644
index 000000000..32cc99782
--- /dev/null
+++ b/doc/ExistsCommand.html
@@ -0,0 +1,42 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>ExistsCommand: Contents</b><br>&nbsp;&nbsp;<a href="#EXISTS _key_">EXISTS _key_</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Return value">Return value</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#See also">See also</a>
+ </div>
+
+ <h1 class="wikiname">ExistsCommand</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+ <h1><a name="EXISTS _key_">EXISTS _key_</a></h1>
+<i>Time complexity: O(1)</i><blockquote>Test if the specified key exists. The command returns&quot;0&quot; if the key exists, otherwise &quot;1&quot; is returned.Note that even keys set with an empty string as value willreturn &quot;1&quot;.</blockquote>
+<h2><a name="Return value">Return value</a></h2><a href="ReplyTypes.html">Integer reply</a>, specifically:<br/><br/><pre class="codeblock python" name="code">
+1 if the key exists.
+0 if the key does not exist.
+</pre><h2><a name="See also">See also</a></h2>
+<ul><li> <a href="SetnxCommand.html">SETNX</a> is a <code name="code" class="python">SET if not EXISTS</code> atomic operation.</li><li> <a href="SismemberCommand.html">SISMEMBER</a> test if an element is a member of a Set.</li></ul>
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/ExpireCommand.html b/doc/ExpireCommand.html
new file mode 100644
index 000000000..3a78e1e2e
--- /dev/null
+++ b/doc/ExpireCommand.html
@@ -0,0 +1,68 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>ExpireCommand: Contents</b><br>&nbsp;&nbsp;<a href="#EXPIRE _key_ _seconds_">EXPIRE _key_ _seconds_</a><br>&nbsp;&nbsp;<a href="#EXPIREAT _key_ _unixtime_ (Redis &gt;">EXPIREAT _key_ _unixtime_ (Redis &gt;</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#How the expire is removed from a key">How the expire is removed from a key</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Restrictions with write operations against volatile keys">Restrictions with write operations against volatile keys</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Setting the timeout again on already volatile keys">Setting the timeout again on already volatile keys</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Enhanced Lazy Expiration algorithm">Enhanced Lazy Expiration algorithm</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Version 1.0">Version 1.0</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Version 1.1">Version 1.1</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Return value">Return value</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#See also">See also</a>
+ </div>
+
+ <h1 class="wikiname">ExpireCommand</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+ <h1><a name="EXPIRE _key_ _seconds_">EXPIRE _key_ _seconds_</a></h1>
+<h1><a name="EXPIREAT _key_ _unixtime_ (Redis &gt;">EXPIREAT _key_ _unixtime_ (Redis &gt;</a></h1> 1.1)=
+<i>Time complexity: O(1)</i><blockquote>Set a timeout on the specified key. After the timeout the key will beautomatically delete by the server. A key with an associated timeout issaid to be <i>volatile</i> in Redis terminology.</blockquote>
+<blockquote>Voltile keys are stored on disk like the other keys, the timeout is persistenttoo like all the other aspects of the dataset. Saving a dataset containingthe dataset and stopping the server does not stop the flow of time as Redisregisters on disk when the key will no longer be available as Unix time, andnot the remaining seconds.</blockquote>
+<blockquote>EXPIREAT works exctly like EXPIRE but instead to get the number of secondsrepresenting the Time To Live of the key as a second argument (that is arelative way of specifing the TTL), it takes an absolute one in the form ofa UNIX timestamp (Number of seconds elapsed since 1 Gen 1970).</blockquote>
+<blockquote>EXPIREAT was introduced in order to implement [Persistence append only saving mode] so that EXPIRE commands are automatically translated into EXPIREAT commands for the append only file. Of course EXPIREAT can alsoused by programmers that need a way to simply specify that a given key should expire at a given time in the future.</blockquote>
+<h2><a name="How the expire is removed from a key">How the expire is removed from a key</a></h2><blockquote>When the key is set to a new value using the SET command, the INCR commandor any other command that modify the value stored at key the timeout isremoved from the key and the key becomes non volatile.</blockquote>
+<h2><a name="Restrictions with write operations against volatile keys">Restrictions with write operations against volatile keys</a></h2><blockquote>Write operations like LPUSH, LSET and every other command that has theeffect of modifying the value stored at a volatile key have a special semantic:basically a volatile key is destroyed when it is target of a write operation.See for example the following usage pattern:</blockquote>
+<pre class="codeblock python" name="code">
+% ./redis-cli lpush mylist foobar /Users/antirez/hack/redis
+OK
+% ./redis-cli lpush mylist hello /Users/antirez/hack/redis
+OK
+% ./redis-cli expire mylist 10000 /Users/antirez/hack/redis
+1
+% ./redis-cli lpush mylist newelement
+OK
+% ./redis-cli lrange mylist 0 -1 /Users/antirez/hack/redis
+1. newelement
+</pre><blockquote>What happened here is that lpush against the key with a timeout set deletedthe key before to perform the operation. There is so a simple rule, writeoperations against volatile keys will destroy the key before to perform theoperation. Why Redis uses this behavior? In order to retain an importantproperty: a server that receives a given number of commands in the samesequence will end with the same dataset in memory. Without the delete-on-writesemantic what happens is that the state of the server depends on the timeof the commands to. This is not a desirable property in a distributed databasethat supports replication.</blockquote>
+<h2><a name="Setting the timeout again on already volatile keys">Setting the timeout again on already volatile keys</a></h2><blockquote>Trying to call EXPIRE against a key that already has an associated timeoutwill not change the timeout of the key, but will just return 0. If insteadthe key does not have a timeout associated the timeout will be set and EXPIREwill return 1.</blockquote>
+<h2><a name="Enhanced Lazy Expiration algorithm">Enhanced Lazy Expiration algorithm</a></h2><blockquote>Redis does not constantly monitor keys that are going to be expired.Keys are expired simply when some client tries to access a key, andthe key is found to be timed out.</blockquote>
+<blockquote>Of course this is not enough as there are expired keys that will neverbe accessed again. This keys should be expired anyway, so once everysecond Redis test a few keys at random among keys with an expire set.All the keys that are already expired are deleted from the keyspace. </blockquote>
+<h3><a name="Version 1.0">Version 1.0</a></h3><blockquote>Each time a fixed number of keys where tested (100 by default). So ifyou had a client setting keys with a very short expire faster than 100for second the memory continued to grow. When you stopped to insertnew keys the memory started to be freed, 100 keys every second in thebest conditions. Under a peak Redis continues to use more and more RAMeven if most keys are expired in each sweep.</blockquote>
+<h3><a name="Version 1.1">Version 1.1</a></h3><blockquote>Each time Redis:</blockquote>
+<ol><li> Tests 100 random keys from expired keys set.</li><li> Deletes all the keys found expired.</li><li> If more than 25 keys were expired, it start again from 1.</li></ol>
+<blockquote>This is a trivial probabilistic algorithm, basically the assumption isthat our sample is representative of the whole key space,and we continue to expire until the percentage of keys that are likelyto be expired is under 25%</blockquote>
+<blockquote>This means that at any given moment the maximum amount of keys alreadyexpired that are using memory is at max equal to max setting operations per second divided by 4.</blockquote>
+<h2><a name="Return value">Return value</a></h2><a href="ReplyTypes.html">Integer reply</a>, specifically:<br/><br/><pre class="codeblock python python" name="code">
+1: the timeout was set.
+0: the timeout was not set since the key already has an associated timeout, or the key does not exist.
+</pre><h2><a name="See also">See also</a></h2>
+<ul><li> <a href="InfoCommand.html">INFO</a></li><li> <a href="TypeCommand.html">TYPE</a></li></ul>
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/FAQ.html b/doc/FAQ.html
new file mode 100644
index 000000000..d87bebc35
--- /dev/null
+++ b/doc/FAQ.html
@@ -0,0 +1,70 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>FAQ: Contents</b><br>&nbsp;&nbsp;<a href="#Why I need Redis if there is already memcachedb, Tokyo Cabinet, ...?">Why I need Redis if there is already memcachedb, Tokyo Cabinet, ...?</a><br>&nbsp;&nbsp;<a href="#Isn't this key-value thing just hype?">Isn't this key-value thing just hype?</a><br>&nbsp;&nbsp;<a href="#Can I backup a Redis DB while the server is working?">Can I backup a Redis DB while the server is working?</a><br>&nbsp;&nbsp;<a href="#What's the Redis memory footprint?">What's the Redis memory footprint?</a><br>&nbsp;&nbsp;<a href="#I like Redis high level operations and features, but I don't like it takes everything in memory and I can't have a dataset larger the memory. Plans to change this?">I like Redis high level operations and features, but I don't like it takes everything in memory and I can't have a dataset larger the memory. Plans to change this?</a><br>&nbsp;&nbsp;<a href="#Why Redis takes the whole dataset in RAM?">Why Redis takes the whole dataset in RAM?</a><br>&nbsp;&nbsp;<a href="#If my dataset is too big for RAM and I don't want to use consistent hashing or other ways to distribute the dataset across different nodes, what I can do to use Redis anyway?">If my dataset is too big for RAM and I don't want to use consistent hashing or other ways to distribute the dataset across different nodes, what I can do to use Redis anyway?</a><br>&nbsp;&nbsp;<a href="#Do you plan to implement Virtual Memory in Redis? Why don't just let the Operating System handle it for you?">Do you plan to implement Virtual Memory in Redis? Why don't just let the Operating System handle it for you?</a><br>&nbsp;&nbsp;<a href="#I have an empty Redis server but INFO and logs are reporting megabytes of memory in use!">I have an empty Redis server but INFO and logs are reporting megabytes of memory in use!</a><br>&nbsp;&nbsp;<a href="#What happens if Redis runs out of memory?">What happens if Redis runs out of memory?</a><br>&nbsp;&nbsp;<a href="#How much time it takes to load a big database at server startup?">How much time it takes to load a big database at server startup?</a><br>&nbsp;&nbsp;<a href="#Background saving is failing with a fork() error under Linux even if I've a lot of free RAM!">Background saving is failing with a fork() error under Linux even if I've a lot of free RAM!</a><br>&nbsp;&nbsp;<a href="#Are Redis on disk snapshots atomic?">Are Redis on disk snapshots atomic?</a><br>&nbsp;&nbsp;<a href="#Redis is single threaded, how can I exploit multiple CPU / cores?">Redis is single threaded, how can I exploit multiple CPU / cores?</a><br>&nbsp;&nbsp;<a href="#I'm using some form of key hashing for partitioning, but what about SORT BY?">I'm using some form of key hashing for partitioning, but what about SORT BY?</a><br>&nbsp;&nbsp;<a href="#What is the maximum number of keys a single Redis instance can hold? and what the max number of elements in a List, Set, Ordered Set?">What is the maximum number of keys a single Redis instance can hold? and what the max number of elements in a List, Set, Ordered Set?</a><br>&nbsp;&nbsp;<a href="#What Redis means actually?">What Redis means actually?</a><br>&nbsp;&nbsp;<a href="#Why did you started the Redis project?">Why did you started the Redis project?</a>
+ </div>
+
+ <h1 class="wikiname">FAQ</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+ <h1><a name="Why I need Redis if there is already memcachedb, Tokyo Cabinet, ...?">Why I need Redis if there is already memcachedb, Tokyo Cabinet, ...?</a></h1>Memcachedb is basically memcached done persistent. Redis is a different evolution
+path in the key-value DBs, the idea is that the main advantages of key-value DBs
+are retained even without a so severe loss of comfort of plain key-value DBs.
+So Redis offers more features:<br/><br/><ul><li> Keys can store different data types, not just strings. Notably Lists and Sets. For example if you want to use Redis as a log storage system for different computers every computer can just <code name="code" class="python">RPUSH data to the computer_ID key</code>. Don't want to save more than 1000 log lines per computer? Just issue a <code name="code" class="python">LTRIM computer_ID 0 999</code> command to trim the list after every push.</li></ul>
+<ul><li> Another example is about Sets. Imagine to build a social news site like <a href="http://reddit.com" target="_blank">Reddit</a>. Every time a user upvote a given news you can just add to the news_ID_upmods key holding a value of type SET the id of the user that did the upmodding. Sets can also be used to index things. Every key can be a tag holding a SET with the IDs of all the objects associated to this tag. Using Redis set intersection you obtain the list of IDs having all this tags at the same time.</li></ul>
+<ul><li> We wrote a <a href="http://retwis.antirez.com" target="_blank">simple Twitter Clone</a> using just Redis as database. Download the source code from the download section and imagine to write it with a plain key-value DB without support for lists and sets... it's <b>much</b> harder.</li></ul>
+<ul><li> Multiple DBs. Using the SELECT command the client can select different datasets. This is useful because Redis provides a MOVE atomic primitive that moves a key form a DB to another one, if the target DB already contains such a key it returns an error: this basically means a way to perform locking in distributed processing.</li></ul>
+<ul><li> <b>So what is Redis really about?</b> The User interface with the programmer. Redis aims to export to the programmer the right tools to model a wide range of problems. <b>Sets, Lists with O(1) push operation, lrange and ltrim, server-side fast intersection between sets, are primitives that allow to model complex problems with a key value database</b>.</li></ul>
+<h1><a name="Isn't this key-value thing just hype?">Isn't this key-value thing just hype?</a></h1>I imagine key-value DBs, in the short term future, to be used like you use memory in a program, with lists, hashes, and so on. With Redis it's like this, but this special kind of memory containing your data structures is shared, atomic, persistent.<br/><br/>When we write code it is obvious, when we take data in memory, to use the most sensible data structure for the work, right? Incredibly when data is put inside a relational DB this is no longer true, and we create an absurd data model even if our need is to put data and get this data back in the same order we put it inside (an ORDER BY is required when the data should be already sorted. Strange, dont' you think?).<br/><br/>Key-value DBs bring this back at home, to create sensible data models and use the right data structures for the problem we are trying to solve.<h1><a name="Can I backup a Redis DB while the server is working?">Can I backup a Redis DB while the server is working?</a></h1>Yes you can. When Redis saves the DB it actually creates a temp file, then rename(2) that temp file name to the destination file name. So even while the server is working it is safe to save the database file just with the <i>cp</i> unix command. Note that you can use master-slave replication in order to have redundancy of data, but if all you need is backups, cp or scp will do the work pretty well.<h1><a name="What's the Redis memory footprint?">What's the Redis memory footprint?</a></h1>Worst case scenario: 1 Million keys with the key being the natural numbers from 0 to 999999 and the string &quot;Hello World&quot; as value use 100MB on my Intel macbook (32bit). Note that the same data stored linearly in an unique string takes something like 16MB, this is the norm because with small keys and values there is a lot of overhead. Memcached will perform similarly.<br/><br/>With large keys/values the ratio is much better of course.<br/><br/>64 bit systems will use much more memory than 32 bit systems to store the same keys, especially if the keys and values are small, this is because pointers takes 8 bytes in 64 bit systems. But of course the advantage is that you can have a lot of memory in 64 bit systems, so to run large Redis servers a 64 bit system is more or less required.<h1><a name="I like Redis high level operations and features, but I don't like it takes everything in memory and I can't have a dataset larger the memory. Plans to change this?">I like Redis high level operations and features, but I don't like it takes everything in memory and I can't have a dataset larger the memory. Plans to change this?</a></h1>Short answer: If you are using a Redis client that supports consistent hashing you can distribute the dataset across different nodes. For instance the Ruby clients supports this feature. There are plans to develop redis-cluster that basically is a dummy Redis server that is only used in order to distribute the requests among N different nodes using consistent hashing.<h1><a name="Why Redis takes the whole dataset in RAM?">Why Redis takes the whole dataset in RAM?</a></h1>Redis takes the whole dataset in memory and writes asynchronously on disk in order to be very fast, you have the best of both worlds: hyper-speed and persistence of data, but the price to pay is exactly this, that the dataset must fit on your computers RAM.<br/><br/>If the data is larger then memory, and this data is stored on disk, what happens is that the bottleneck of the disk I/O speed will start to ruin the performances. Maybe not in benchmarks, but once you have real load from multiple clients with distributed key accesses the data must come from disk, and the disk is damn slow. Not only, but Redis supports higher level data structures than the plain values. To implement this things on disk is even slower.<br/><br/>Redis will always continue to hold the whole dataset in memory because this days scalability requires to use RAM as storage media, and RAM is getting cheaper and cheaper. Today it is common for an entry level server to have 16 GB of RAM! And in the 64-bit era there are no longer limits to the amount of RAM you can have in theory.<br/><br/>Amazon EC2 now provides instances with 32 or 64 GB of RAM.<h1><a name="If my dataset is too big for RAM and I don't want to use consistent hashing or other ways to distribute the dataset across different nodes, what I can do to use Redis anyway?">If my dataset is too big for RAM and I don't want to use consistent hashing or other ways to distribute the dataset across different nodes, what I can do to use Redis anyway?</a></h1>You may try to load a dataset larger than your memory in Redis and see what happens, basically if you are using a modern Operating System, and you have a lot of data in the DB that is rarely accessed, the OS's virtual memory implementation will try to swap rarely used pages of memory on the disk, to only recall this pages when they are needed. If you have many large values rarely used this will work. If your DB is big because you have tons of little values accessed at random without a specific pattern this will not work (at low level a page is usually 4096 bytes, and you can have different keys/values stored at a single page. The OS can't swap this page on disk if there are even few keys used frequently).<br/><br/>Another possible solution is to use both MySQL and Redis at the same time, basically take the state on Redis, and all the things that get accessed very frequently: user auth tokens, Redis Lists with chronologically ordered IDs of the last N-comments, N-posts, and so on. Then use MySQL as a simple storage engine for larger data, that is just create a table with an auto-incrementing ID as primary key and a large BLOB field as data field. Access MySQL data only by primary key (the ID). The application will run the high traffic queries against Redis but when there is to take the big data will ask MySQL for specific resources IDs.<br/><br/>Update: it could be interesting to test how Redis performs with datasets larger than memory if the OS swap partition is in one of this very fast Intel SSD disks.<h1><a name="Do you plan to implement Virtual Memory in Redis? Why don't just let the Operating System handle it for you?">Do you plan to implement Virtual Memory in Redis? Why don't just let the Operating System handle it for you?</a></h1>Yes, in order to support datasets bigger than RAM there is the plan to
+implement transparent Virtual Memory in Redis, that is, the ability to
+transfer large values associated to keys rarely used on Disk, and
+reload them transparently in memory when this values are requested in
+some way.<br/><br/>So you may ask why don't let the operating system VM do the work for
+us. There are two main reasons: in Redis even a large value stored at
+a given key, for instance a 1 million elements list, is not allocated
+in a contiguous piece of memory. It's actually <b>very</b> fragmented since
+Redis uses quite aggressive object sharing and allocated Redis Objects
+structures reuse.<br/><br/>So you can imagine the memory layout composed of 4096 bytes pages that
+actually contain different parts of different large values. Not only,
+but a lot of values that are large enough for us to swap out to disk,
+like a 1024k value, is just one quarter the size of a memory page, and
+likely in the same page there are other values that are not rarely
+used. So this value wil never be swapped out by the operating system.
+This is the first reason for implementing application-level virtual
+memory in Redis.<br/><br/>There is another one, as important as the first. A complex object in
+memory like a list or a set is something <b>10 times bigger</b> than the
+same object serialized on disk. Probably you already noticed how Redis
+snapshots on disk are damn smaller compared to the memory usage of
+Redis for the same objects. This happens because when data is in
+memory is full of pointers, reference counters and other metadata. Add
+to this malloc fragmentation and need to return word-aligned chunks of
+memory and you have a clear picture of what happens. So this means to
+have 10 times the I/O between memory and disk than otherwise needed.<h1><a name="I have an empty Redis server but INFO and logs are reporting megabytes of memory in use!">I have an empty Redis server but INFO and logs are reporting megabytes of memory in use!</a></h1>This may happen and it's prefectly ok. Redis objects are small C structures allocated and freed a lot of times. This costs a lot of CPU so instead of being freed, released objects are taken into a free list and reused when needed. This memory is taken exactly by this free objects ready to be reused.<h1><a name="What happens if Redis runs out of memory?">What happens if Redis runs out of memory?</a></h1>With modern operating systems malloc() returning NULL is not common, usually the server will start swapping and Redis performances will be disastrous so you'll know it's time to use more Redis servers or get more RAM.<br/><br/>The INFO command (work in progress in this days) will report the amount of memory Redis is using so you can write scripts that monitor your Redis servers checking for critical conditions.<br/><br/>You can also use the &quot;maxmemory&quot; option in the config file to put a limit to the memory Redis can use. If this limit is reached Redis will start to reply with an error to write commands (but will continue to accept read-only commands).<h1><a name="How much time it takes to load a big database at server startup?">How much time it takes to load a big database at server startup?</a></h1>Just an example on normal hardware: It takes about 45 seconds to restore a 2 GB database on a fairly standard system, no RAID. This can give you some kind of feeling about the order of magnitude of the time needed to load data when you restart the server.<h1><a name="Background saving is failing with a fork() error under Linux even if I've a lot of free RAM!">Background saving is failing with a fork() error under Linux even if I've a lot of free RAM!</a></h1>Short answer: <code name="code" class="python">echo 1 &gt; /proc/sys/vm/overcommit_memory</code> :)<br/><br/>And now the long one:<br/><br/>Redis background saving schema relies on the copy-on-write semantic of fork in modern operating systems: Redis forks (creates a child process) that is an exact copy of the parent. The child process dumps the DB on disk and finally exits. In theory the child should use as much memory as the parent being a copy, but actually thanks to the copy-on-write semantic implemented by most modern operating systems the parent and child process will <i>share</i> the common memory pages. A page will be duplicated only when it changes in the child or in the parent. Since in theory all the pages may change while the child process is saving, Linux can't tell in advance how much memory the child will take, so if the <code name="code" class="python">overcommit_memory</code> setting is set to zero fork will fail unless there is as much free RAM as required to really duplicate all the parent memory pages, with the result that if you have a Redis dataset of 3 GB and just 2 GB of free memory it will fail.<br/><br/>Setting <code name="code" class="python">overcommit_memory</code> to 1 says Linux to relax and perform the fork in a more optimistic allocation fashion, and this is indeed what you want for Redis.<h1><a name="Are Redis on disk snapshots atomic?">Are Redis on disk snapshots atomic?</a></h1>Yes, redis background saving process is always fork(2)ed when the server is outside of the execution of a command, so every command reported to be atomic in RAM is also atomic from the point of view of the disk snapshot.<h1><a name="Redis is single threaded, how can I exploit multiple CPU / cores?">Redis is single threaded, how can I exploit multiple CPU / cores?</a></h1>Simply start multiple instances of Redis in different ports in the same box and threat them as different servers! Given that Redis is a distributed database anyway in order to scale you need to think in terms of multiple computational units. At some point a single box may not be enough anyway.<br/><br/>In general key-value databases are very scalable because of the property that different keys can stay on different servers independently.<br/><br/>In Redis there are client libraries such Redis-rb (the Ruby client) that are able to handle multiple servers automatically using <i>consistent hashing</i>. We are going to implement consistent hashing in all the other major client libraries. If you use a different language you can implement it yourself otherwise just hash the key before to SET / GET it from a given server. For example imagine to have N Redis servers, server-0, server-1, ..., server-N. You want to store the key &quot;foo&quot;, what's the right server where to put &quot;foo&quot; in order to distribute keys evenly among different servers? Just perform the <i>crc</i> = CRC32(&quot;foo&quot;), then <i>servernum</i> = <i>crc</i> % N (the rest of the division for N). This will give a number between 0 and N-1 for every key. Connect to this server and store the key. The same for gets.<br/><br/>This is a basic way of performing key partitioning, consistent hashing is much better and this is why after Redis 1.0 will be released we'll try to implement this in every widely used client library starting from Python and PHP (Ruby already implements this support).<h1><a name="I'm using some form of key hashing for partitioning, but what about SORT BY?">I'm using some form of key hashing for partitioning, but what about SORT BY?</a></h1>With <a href="SortCommand.html">SORT</a> BY you need that all the <i>weight keys</i> are in the same Redis instance of the list/set you are trying to sort. In order to make this possible we developed a concept called <i>key tags</i>. A key tag is a special pattern inside a key that, if preset, is the only part of the key hashed in order to select the server for this key. For example in order to hash the key &quot;foo&quot; I simply perform the CRC32 checksum of the whole string, but if this key has a pattern in the form of the characters {...} I only hash this substring. So for example for the key &quot;foo{bared}&quot; the key hashing code will simply perform the CRC32 of &quot;bared&quot;. This way using key tags you can ensure that related keys will be stored on the same Redis instance just using the same key tag for all this keys. Redis-rb already implements key tags.<h1><a name="What is the maximum number of keys a single Redis instance can hold? and what the max number of elements in a List, Set, Ordered Set?">What is the maximum number of keys a single Redis instance can hold? and what the max number of elements in a List, Set, Ordered Set?</a></h1>In theory Redis can handle up to 2<sup>32 keys, and was tested in practice to handle at least 150 million of keys per instance. We are working in order to experiment with larger values.<br/><br/>Every list, set, and ordered set, can hold 2</sup>32 elements.<br/><br/>Actually Redis internals are ready to allow up to 2<sup>64 elements but the current disk dump format don't support this, and there is a lot time to fix this issues in the future as currently even with 128 GB of RAM it's impossible to reach 2</sup>32 elements.<h1><a name="What Redis means actually?">What Redis means actually?</a></h1>Redis means two things:
+<ul><li> it's a joke on the word Redistribute (instead to use just a Relational DB redistribute your workload among Redis servers)</li><li> it means REmote DIctionary Server</li></ul>
+<h1><a name="Why did you started the Redis project?">Why did you started the Redis project?</a></h1>In order to scale <a href="http://lloogg.com" target="_blank">LLOOGG</a>. But after I got the basic server working I liked the idea to share the work with other guys, and Redis was turned into an open source project.
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/Features.html b/doc/Features.html
new file mode 100644
index 000000000..62fa13503
--- /dev/null
+++ b/doc/Features.html
@@ -0,0 +1,36 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>Features: Contents</b><br>&nbsp;&nbsp;<a href="#Features (DRAFT)">Features (DRAFT)</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Speed">Speed</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Persistence">Persistence</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Support for Data Structures">Support for Data Structures</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Atomic Operations">Atomic Operations</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Variety of Supported Languages">Variety of Supported Languages</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Master/Slave Replication">Master/Slave Replication</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Sharding">Sharding</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Hot Backups">Hot Backups</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Simple to Install, Setup and Manage">Simple to Install, Setup and Manage</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Portable">Portable</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Liberal Licensing">Liberal Licensing</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#What's next?">What's next?</a>
+ </div>
+
+ <h1 class="wikiname">Features</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+ <h1><a name="Features (DRAFT)">Features (DRAFT)</a></h1>Checking Redis for the first time? Here your will find the most important features, and pointers to a lot more information.<h2><a name="Speed">Speed</a></h2>Redis is written in ANSI C, and loads the whole dataset in memory, so it is wicked <i><b>fast</b>!</i> Up to 110,000 SETs/second, 81,000 GETs/second can be achieved in an entry level Linux box. Read more about Redis <a href="Speed.html">Speed</a>.<br/><br/>Also Redis supports <a href="Pipelining.html">Pipelining</a> of commands and <a href="MultiBulkCommands.html">getting and setting m&Atilde;&ordm;ltiple values in a single command</a> to speed up communication with the client libraries.<h2><a name="Persistence">Persistence</a></h2>While all the data lives in memory, changes are <i>asynchronously</i> saved on disk using flexible policies based on elapsed time and/or number of updates since last save. <br/><br/>If you can't afford losing some data, starting on version 1.1 (currently in beta but you can download it from the Git repository) Redis supports an append-only file persistence mode. Check more on <a href="Persistence.html">Persistence</a>, or read the <a href="AppendOnlyFileHowto.html">AppendOnlyFileHowto</a> for more information.<h2><a name="Support for Data Structures">Support for Data Structures</a></h2>Values in Redis can be <a href="Strings.html">Strings</a> as in a conventional key-value store, but also <a href="Lists.html">Lists</a>, <a href="Sets.html">Sets</a>, and <a href="OrderedSets.html">OrderedSets</a> (to be support in <a href="RoadMap.html">version 1.1</a>). This data types allow pushing/poping elements, or adding/removing them, also perform server side union, intersection, difference between sets, and so forth depending on the types. Redis supports different kind of sorting abilities for <a href="Sets.html">Sets</a> and <a href="Lists.html">Lists</a>.<br/><br/>You can think in Redis as a <b>Data Structures Server</b>, that allows you to model non trivial problems. Read <a href="DataTypes.html">Data Types</a> to learn more about the way Redis handle <a href="Strings.html">Strings</a>, and the <a href="Commands.html">Commands</a> supported by <a href="Lists.html">Lists</a>, <a href="Sets.html">Sets</a> and <a href="OrderedSets.html">OrderedSets</a><h2><a name="Atomic Operations">Atomic Operations</a></h2>Redis operations working on the different Data Types are <b>atomic</b>, so setting or increasing a key, adding and removing elements from a set, increasing a counter will all be accomplished safely.<h2><a name="Variety of Supported Languages">Variety of Supported Languages</a></h2>Ruby, Python, Twisted Python, PHP, Erlang, Tcl, Perl, Lua, Java, Scala, Clojure, choose your poison. Check the list of <a href="SupportedLanguages.html">Supported Languages</a> for all the details.<br/><br/>If your favorite language is not supported yet, you can write your own client library, as the <a href="ProtocolSpecification.html">Protocol</a> is pretty simple.<h2><a name="Master/Slave Replication">Master/Slave Replication</a></h2>Redis supports a very simple and fast Master/Slave replication. Is so simple it takes only one line in the <a href="Configuration.html">configuration file</a> to set it up, and 21 seconds for a Slave to complete the initial sync of 10 MM key set in a Amazon EC2 instance.<br/><br/>Read more about Master/Slave <a href="Replication.html">Replication</a>. <h2><a name="Sharding">Sharding</a></h2>Distributing the dataset across multiple Redis instances is easy in Redis, as in any other key-value store. And this depends basically on the <a href="Supported.html">Languages</a> client libraries being able to do so. <br/><br/>Read more about <a href="Sharding.html">Sharding</a> if you want to know more abour distributing data and workload in Redis.<h2><a name="Hot Backups">Hot Backups</a></h2>TODO<h2><a name="Simple to Install, Setup and Manage">Simple to Install, Setup and Manage</a></h2>Installing Redis requires little more than downloading it, uncompressing it and running make. Management is near zero, so you can start using Redis in a matter of minutes.<br/><br/>Go on and read about Redis <a href="Installation.html">installation</a>, its <a href="Setup.html">Setup</a> and <a href="Management.html">Management</a>.<h2><a name="Portable">Portable</a></h2>Redis is written in ANSI C and works in most POSIX systems like Linux, BSD, Mac OS X, Solaris, and so on. Redis is reported to compile and work under WIN32 if compiled with Cygwin, but there is no official support for Windows currently.<h2><a name="Liberal Licensing">Liberal Licensing</a></h2>Redis is free software released under the very liberal BSD license.<h2><a name="What's next?">What's next?</a></h2>Want to get started with Redis? Try the <a href="QuickStart.html">Quick Start</a> you will be up and running in just a matter of minutes. <br/><br/>Check the <a href="CodeSamples.html">Code Samples</a> and find how you can use Redis with your favorite programming language.<br/><br/><a href="Comparisons.html">Compare</a> Redis with other key-value stores, like Tokyo Cabinet or Memcached.
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/FlushallCommand.html b/doc/FlushallCommand.html
new file mode 100644
index 000000000..85c842257
--- /dev/null
+++ b/doc/FlushallCommand.html
@@ -0,0 +1,39 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>FlushallCommand: Contents</b><br>&nbsp;&nbsp;<a href="#FLUSHALL">FLUSHALL</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Return value">Return value</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#See also">See also</a>
+ </div>
+
+ <h1 class="wikiname">FlushallCommand</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+ <h1><a name="FLUSHALL">FLUSHALL</a></h1>
+<blockquote>Delete all the keys of all the existing databases, not just the currently selected one. This command never fails.</blockquote>
+<h2><a name="Return value">Return value</a></h2><a href="ReplyTypes.html">Status code reply</a><h2><a name="See also">See also</a></h2>
+<ul><li> <a href="FlushdbCommand.html">FLUSHDB</a></li></ul>
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/FlushdbCommand.html b/doc/FlushdbCommand.html
new file mode 100644
index 000000000..6bf4ca04b
--- /dev/null
+++ b/doc/FlushdbCommand.html
@@ -0,0 +1,39 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>FlushdbCommand: Contents</b><br>&nbsp;&nbsp;<a href="#FLUSHDB">FLUSHDB</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Return value">Return value</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#See also">See also</a>
+ </div>
+
+ <h1 class="wikiname">FlushdbCommand</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+ <h1><a name="FLUSHDB">FLUSHDB</a></h1>
+<blockquote>Delete all the keys of the currently selected DB. This command never fails.</blockquote>
+<h2><a name="Return value">Return value</a></h2><a href="ReplyTypes.html">Status code reply</a><h2><a name="See also">See also</a></h2>
+<ul><li> <a href="FlushallCommand.html">FLUSHALL</a></li></ul>
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/FromSqlToDataStructures.html b/doc/FromSqlToDataStructures.html
new file mode 100644
index 000000000..bdfdb278d
--- /dev/null
+++ b/doc/FromSqlToDataStructures.html
@@ -0,0 +1,37 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>FromSqlToDataStructures: Contents</b><br>&nbsp;&nbsp;<a href="#Introduction (IDEA MORE THAN A DRAFT)">Introduction (IDEA MORE THAN A DRAFT)</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Data Structures">Data Structures</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Dude where is my SELECT statement?">Dude where is my SELECT statement?</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#LISTs">LISTs</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#SETs">SETs</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#SORT to the rescue">SORT to the rescue</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#SORT BY">SORT BY</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#HASHEs">HASHEs</a>
+ </div>
+
+ <h1 class="wikiname">FromSqlToDataStructures</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+
+<h1><a name="Introduction (IDEA MORE THAN A DRAFT)">Introduction (IDEA MORE THAN A DRAFT)</a></h1><b>&Acirc;&iquest;Coming from SQLand?</b> <i>&Acirc;&iquest;Who doesn't?</i> Redis is simple, <i>primitive</i> when comapred to the world you are used to in the world of Relational Database Managers (RDBMS) and Structure Query Language (SQL), here you will find insight to build bridges between both worlds to model real life problems.<h2><a name="Data Structures">Data Structures</a></h2>When I was young, happy and single ;) I studied <b>Data Structures</b> at the university, actually I learnt Data Structures and Algorithms <i>before</i> learning anything about Databases, and particularly RDBMS and SQL. This is natural because you need to know about Data Structures and Algorithms to understand a Database.<br/><br/>Redis can be seen as a <b>Data Structures Server</b>, a very simple interface to a extremly fast and efficient <h2><a name="Dude where is my SELECT statement?">Dude where is my SELECT statement?</a></h2><h2><a name="LISTs">LISTs</a></h2>In SQL there is no such thing as a &quot;natural&quot; order, a SELECT statement without a ORDER BY clause will return data in a undefined order. In Redis LISTs address the problem of natural ordering, ...<h2><a name="SETs">SETs</a></h2>So you have a bunch of unordered data, <h2><a name="SORT to the rescue">SORT to the rescue</a></h2>But sometimes we <i>need</i> to actually sort a LIST in a order different from its natural or take a SET and have it ordered, there is where the <i>fast</i> SORT commands comes handy... <h3><a name="SORT BY">SORT BY</a></h3>Just SORTing keys would be kind of boring, sometimes useless right? Well, you can SORT...<h2><a name="HASHEs">HASHEs</a></h2>Umm, sorry you will have to wait for a <a href="RoadMap.html">upcoming version of Redis</a> to have Hashes, but here are Idioms you should house to manage Dictionary like data...
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/GetCommand.html b/doc/GetCommand.html
new file mode 100644
index 000000000..50d6bf344
--- /dev/null
+++ b/doc/GetCommand.html
@@ -0,0 +1,39 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>GetCommand: Contents</b><br>&nbsp;&nbsp;<a href="#GET _key_">GET _key_</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Return value">Return value</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#See also">See also</a>
+ </div>
+
+ <h1 class="wikiname">GetCommand</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+ <h1><a name="GET _key_">GET _key_</a></h1>
+<i>Time complexity: O(1)</i><blockquote>Get the value of the specified key. If the keydoes not exist the special value 'nil' is returned.If the value stored at <i>key</i> is not a string an erroris returned because GET can only handle string values.</blockquote>
+<h2><a name="Return value">Return value</a></h2><a href="ReplyTypes.html">Bulk reply</a><h2><a name="See also">See also</a></h2>
+<ul><li> <a href="SetCommand.html">SET</a></li><li> <a href="SetnxCommand.html">SETNX</a></li><li> <a href="IncrCommand.html">INCR</a></li></ul>
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/GetsetCommand.html b/doc/GetsetCommand.html
new file mode 100644
index 000000000..e1d8d5386
--- /dev/null
+++ b/doc/GetsetCommand.html
@@ -0,0 +1,40 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>GetsetCommand: Contents</b><br>&nbsp;&nbsp;<a href="#GETSET _key_ _value_">GETSET _key_ _value_</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Return value">Return value</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Design patterns">Design patterns</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#See also">See also</a>
+ </div>
+
+ <h1 class="wikiname">GetsetCommand</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+ <h1><a name="GETSET _key_ _value_">GETSET _key_ _value_</a></h1>
+<i>Time complexity: O(1)</i><blockquote>GETSET is an atomic <i>set this value and return the old value</i> command.Set <i>key</i> to the string <i>value</i> and return the old value stored at <i>key</i>.The string can't be longer than 1073741824 bytes (1 GB).</blockquote>
+<h2><a name="Return value">Return value</a></h2><a href="ReplyTypes.html">Bulk reply</a><h2><a name="Design patterns">Design patterns</a></h2><blockquote>GETSET can be used together with INCR for counting with atomic reset whena given condition arises. For example a process may call INCR against thekey <i>mycounter</i> every time some event occurred, but from time totime we need to get the value of the counter and reset it to zero atomicallyusing <code name="code" class="python">GETSET mycounter 0</code>.</blockquote>
+<h2><a name="See also">See also</a></h2>
+<ul><li> <a href="GetCommand.html">GET</a></li><li> <a href="SetCommand.html">SET</a></li><li> <a href="SetnxCommand.html">SETNX</a></li></ul>
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/IncrCommand.html b/doc/IncrCommand.html
new file mode 100644
index 000000000..676d06cbe
--- /dev/null
+++ b/doc/IncrCommand.html
@@ -0,0 +1,43 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>IncrCommand: Contents</b><br>&nbsp;&nbsp;<a href="#INCR _key_">INCR _key_</a><br>&nbsp;&nbsp;<a href="#INCRBY _key_ _integer_">INCRBY _key_ _integer_</a><br>&nbsp;&nbsp;<a href="#DECR _key_ _integer_">DECR _key_ _integer_</a><br>&nbsp;&nbsp;<a href="#DECRBY _key_ _integer_">DECRBY _key_ _integer_</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Return value">Return value</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#See also">See also</a>
+ </div>
+
+ <h1 class="wikiname">IncrCommand</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+ <h1><a name="INCR _key_">INCR _key_</a></h1>
+<h1><a name="INCRBY _key_ _integer_">INCRBY _key_ _integer_</a></h1>
+<h1><a name="DECR _key_ _integer_">DECR _key_ _integer_</a></h1>
+<h1><a name="DECRBY _key_ _integer_">DECRBY _key_ _integer_</a></h1>
+<i>Time complexity: O(1)</i><blockquote>Increment or decrement the number stored at <i>key</i> by one. If the key doesnot exist or contains a value of a wrong type, set the key to thevalue of &quot;0&quot; before to perform the increment or decrement operation.</blockquote>
+<blockquote>INCRBY and DECRBY work just like INCR and DECR but instead toincrement/decrement by 1 the increment/decrement is <i>integer</i>.</blockquote>
+<h2><a name="Return value">Return value</a></h2><a href="ReplyTypes.html">Integer reply</a>, this commands will reply with the new value of <i>key</i> after the increment or decrement.<h2><a name="See also">See also</a></h2>
+<ul><li> <a href="GetCommand.html">GET</a></li></ul>
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/InfoCommand.html b/doc/InfoCommand.html
new file mode 100644
index 000000000..325deff47
--- /dev/null
+++ b/doc/InfoCommand.html
@@ -0,0 +1,50 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>InfoCommand: Contents</b><br>&nbsp;&nbsp;<a href="#INFO">INFO</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Return value">Return value</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Notes">Notes</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#See also">See also</a>
+ </div>
+
+ <h1 class="wikiname">InfoCommand</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+ <h1><a name="INFO">INFO</a></h1><blockquote>The info command returns different information and statistics about the server in an format that's simple to parse by computers and easy to red by huamns.</blockquote>
+<h2><a name="Return value">Return value</a></h2><a href="ReplyTypes.html">Bulk reply</a>, specifically in the following format:<br/><br/><pre class="codeblock python" name="code">
+edis_version:0.07
+connected_clients:1
+connected_slaves:0
+used_memory:3187
+changes_since_last_save:0
+last_save_time:1237655729
+total_connections_received:1
+total_commands_processed:1
+uptime_in_seconds:25
+uptime_in_days:0
+</pre>All the fields are in the form <code name="code" class="python">field:value</code><h2><a name="Notes">Notes</a></h2><ul><li> <code name="code" class="python">used_memory</code> is returned in bytes, and is the total number of bytes allocated by the program using <code name="code" class="python">malloc</code>.</li><li> <code name="code" class="python">uptime_in_days</code> is redundant since the uptime in seconds contains already the full uptime information, this field is only mainly present for humans.</li><li> <code name="code" class="python">changes_since_last_save</code> does not refer to the number of key changes, but to the number of operations that produced some kind of change in the dataset.</li></ul>
+<h2><a name="See also">See also</a></h2>
+<ul><li> <a href="LastsaveCommand.html">LASTSAVE</a></li><li> <a href="DbsizeCommand.html">DBSIZE</a></li></ul>
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/KeysCommand.html b/doc/KeysCommand.html
new file mode 100644
index 000000000..98718fc0c
--- /dev/null
+++ b/doc/KeysCommand.html
@@ -0,0 +1,42 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>KeysCommand: Contents</b><br>&nbsp;&nbsp;<a href="#KEYS _pattern_">KEYS _pattern_</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Return value">Return value</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#See also">See also</a>
+ </div>
+
+ <h1 class="wikiname">KeysCommand</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+ <h1><a name="KEYS _pattern_">KEYS _pattern_</a></h1>
+<i>Time complexity: O(n) (with n being the number of keys in the DB, and assuming keys and pattern of limited length)</i><blockquote>Returns all the keys matching the glob-style <i>pattern</i> asspace separated strings. For example if you have in thedatabase the keys &quot;foo&quot; and &quot;foobar&quot; the command &quot;KEYS foo<code name="code" class="python">*</code>&quot;will return &quot;foo foobar&quot;.</blockquote>
+<blockquote>Note that while the time complexity for this operation is O(n)the constant times are pretty low. For example Redis runningon an entry level laptop can scan a 1 million keys databasein 40 milliseconds. Still it's better to consider this one ofthe slow commands that may ruin the DB performance if not usedwith care.</blockquote>
+Glob style patterns examples:
+<ul><li> h?llo will match hello hallo hhllo</li><li> h<b>llo will match hllo heeeello
+<blockquote>* h<a href="ae.html">ae</a>llo will match hello and hallo, but not hillo</blockquote>Use \ to escape special chars if you want to match them verbatim.<h2><a name="Return value">Return value</a></h2><a href="ReplyTypes.html">Bulk reply</a>, specifically a string in the form of space separated list of keys. Note that most client libraries will return an Array of keys and not a single string with space separated keys (that is, split by &quot; &quot; is performed in the client library usually).<h2><a name="See also">See also</a></h2>
+<blockquote>* <a href="RandomkeyCommand.html">RANDOMKEY</a> to get the name of a randomly selected key in O(1).</blockquote></b></li></ul>
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/LastsaveCommand.html b/doc/LastsaveCommand.html
new file mode 100644
index 000000000..c10b80245
--- /dev/null
+++ b/doc/LastsaveCommand.html
@@ -0,0 +1,39 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>LastsaveCommand: Contents</b><br>&nbsp;&nbsp;<a href="#LASTSAVE">LASTSAVE</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Return value">Return value</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#See also">See also</a>
+ </div>
+
+ <h1 class="wikiname">LastsaveCommand</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+ <h1><a name="LASTSAVE">LASTSAVE</a></h1>
+<blockquote>Return the UNIX TIME of the last DB save executed with success.A client may check if a <a href="BgsaveCommand.html">BGSAVE</a> command succeeded reading the LASTSAVEvalue, then issuing a <a href="BgsaveCommand.html">BGSAVE</a> command and checking at regular intervalsevery N seconds if LASTSAVE changed.</blockquote>
+<h2><a name="Return value">Return value</a></h2><a href="ReplyTypes.html">Integer reply</a>, specifically an UNIX time stamp.<h2><a name="See also">See also</a></h2>
+<ul><li> <a href="BgsaveCommand.html">BGSAVE</a></li></ul>
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/LindexCommand.html b/doc/LindexCommand.html
new file mode 100644
index 000000000..3bc903bbb
--- /dev/null
+++ b/doc/LindexCommand.html
@@ -0,0 +1,41 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>LindexCommand: Contents</b><br>&nbsp;&nbsp;<a href="#LINDEX _key_ _index_">LINDEX _key_ _index_</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Return value">Return value</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#See also">See also</a>
+ </div>
+
+ <h1 class="wikiname">LindexCommand</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+ <h1><a name="LINDEX _key_ _index_">LINDEX _key_ _index_</a></h1>
+<i>Time complexity: O(n) (with n being the length of the list)</i><blockquote>Return the specified element of the list stored at the specifiedkey. 0 is the first element, 1 the second and so on. Negative indexesare supported, for example -1 is the last element, -2 the penultimateand so on.</blockquote>
+<blockquote>If the value stored at key is not of list type an error is returned.If the index is out of range an empty string is returned.</blockquote>
+<blockquote>Note that even if the average time complexity is O(n) asking forthe first or the last element of the list is O(1).</blockquote>
+<h2><a name="Return value">Return value</a></h2><a href="ReplyTypes.html">Bulk reply</a>, specifically the requested element.<h2><a name="See also">See also</a></h2>
+<ul><li> <a href="LlenCommand.html">LLEN</a></li><li> <a href="LrangeCommand.html">LRANGE</a></li><li> <a href="LtrimCommand.html">LTRIM</a></li><li> <a href="LremCommand.html">LREM</a></li><li> <a href="LindexCommand.html">LINDEX</a></li><li> <a href="LsetCommand.html">LSET</a></li><li> <a href="RpoplpushCommand.html">RPOPLPUSH</a></li></ul>
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/LlenCommand.html b/doc/LlenCommand.html
new file mode 100644
index 000000000..df9f4a06b
--- /dev/null
+++ b/doc/LlenCommand.html
@@ -0,0 +1,41 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>LlenCommand: Contents</b><br>&nbsp;&nbsp;<a href="#LLEN _key_">LLEN _key_</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Return value">Return value</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#See also">See also</a>
+ </div>
+
+ <h1 class="wikiname">LlenCommand</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+ <h1><a name="LLEN _key_">LLEN _key_</a></h1>
+<i>Time complexity: O(1)</i><blockquote>Return the length of the list stored at the specified key. If thekey does not exist zero is returned (the same behaviour as forempty lists). If the value stored at <i>key</i> is not a list an error is returned.</blockquote>
+<h2><a name="Return value">Return value</a></h2><a href="ReplyTypes.html">Integer reply</a>, specifically:<br/><br/><pre class="codeblock python" name="code">
+The length of the list.
+</pre><h2><a name="See also">See also</a></h2>
+<ul><li> <a href="RpushCommand.html">RPUSH</a></li><li> <a href="RpushCommand.html">LPUSH</a></li><li> <a href="LlenCommand.html">LLEN</a></li><li> <a href="LrangeCommand.html">LRANGE</a></li><li> <a href="LtrimCommand.html">LTRIM</a></li><li> <a href="LindexCommand.html">LINDEX</a></li><li> <a href="LsetCommand.html">LSET</a></li><li> <a href="LremCommand.html">LREM</a></li><li> <a href="LpopCommand.html">LPOP</a></li><li> <a href="LpopCommand.html">RPOP</a></li><li> <a href="RpoplpushCommand.html">RPOPLPUSH</a></li></ul>
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/LpopCommand.html b/doc/LpopCommand.html
new file mode 100644
index 000000000..02f26c936
--- /dev/null
+++ b/doc/LpopCommand.html
@@ -0,0 +1,41 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>LpopCommand: Contents</b><br>&nbsp;&nbsp;<a href="#LPOP _key_">LPOP _key_</a><br>&nbsp;&nbsp;<a href="#RPOP _key_">RPOP _key_</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Return value">Return value</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#See also">See also</a>
+ </div>
+
+ <h1 class="wikiname">LpopCommand</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+ <h1><a name="LPOP _key_">LPOP _key_</a></h1>
+<h1><a name="RPOP _key_">RPOP _key_</a></h1>
+<i>Time complexity: O(1)</i><blockquote>Atomically return and remove the first (LPOP) or last (RPOP) elementof the list. For example if the list contains the elements &quot;a&quot;,&quot;b&quot;,&quot;c&quot; LPOPwill return &quot;a&quot; and the list will become &quot;b&quot;,&quot;c&quot;.</blockquote>
+<blockquote>If the <i>key</i> does not exist or the list is already empty the specialvalue 'nil' is returned.</blockquote>
+<h2><a name="Return value">Return value</a></h2><a href="ReplyTypes.html">Bulk reply</a><h2><a name="See also">See also</a></h2>
+<ul><li> <a href="RpushCommand.html">RPUSH</a></li><li> <a href="RpushCommand.html">LPUSH</a></li><li> <a href="LlenCommand.html">LLEN</a></li><li> <a href="LrangeCommand.html">LRANGE</a></li><li> <a href="LtrimCommand.html">LTRIM</a></li><li> <a href="LindexCommand.html">LINDEX</a></li><li> <a href="LsetCommand.html">LSET</a></li><li> <a href="LremCommand.html">LREM</a></li><li> <a href="LpopCommand.html">LPOP</a></li><li> <a href="LpopCommand.html">RPOP</a></li><li> <a href="RpoplpushCommand.html">RPOPLPUSH</a></li></ul>
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/LrangeCommand.html b/doc/LrangeCommand.html
new file mode 100644
index 000000000..deffd10ac
--- /dev/null
+++ b/doc/LrangeCommand.html
@@ -0,0 +1,42 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>LrangeCommand: Contents</b><br>&nbsp;&nbsp;<a href="#LRANGE _key_ _start_ _end_">LRANGE _key_ _start_ _end_</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Return value">Return value</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#See also">See also</a>
+ </div>
+
+ <h1 class="wikiname">LrangeCommand</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+ <h1><a name="LRANGE _key_ _start_ _end_">LRANGE _key_ _start_ _end_</a></h1>
+<i>Time complexity: O(n) (with n being the length of the range)</i><blockquote>Return the specified elements of the list stored at the specifiedkey. Start and end are zero-based indexes. 0 is the first elementof the list (the list head), 1 the next element and so on.</blockquote>
+<blockquote>For example LRANGE foobar 0 2 will return the first three elementsof the list.</blockquote>
+<blockquote>_start_ and <i>end</i> can also be negative numbers indicating offsetsfrom the end of the list. For example -1 is the last element ofthe list, -2 the penultimate element and so on.</blockquote>
+<blockquote>Indexes out of range will not produce an error: if start is overthe end of the list, or start <code name="code" class="python">&gt;</code> end, an empty list is returned.If end is over the end of the list Redis will threat it just likethe last element of the list.</blockquote>
+<h2><a name="Return value">Return value</a></h2><a href="ReplyTypes.html">Multi bulk reply</a>, specifically a list of elements in the specified range.<h2><a name="See also">See also</a></h2>
+<ul><li> <a href="RpushCommand.html">RPUSH</a></li><li> <a href="RpushCommand.html">LPUSH</a></li><li> <a href="LlenCommand.html">LLEN</a></li><li> <a href="LrangeCommand.html">LRANGE</a></li><li> <a href="LtrimCommand.html">LTRIM</a></li><li> <a href="LindexCommand.html">LINDEX</a></li><li> <a href="LsetCommand.html">LSET</a></li><li> <a href="LremCommand.html">LREM</a></li><li> <a href="LpopCommand.html">LPOP</a></li><li> <a href="LpopCommand.html">RPOP</a></li><li> <a href="RpoplpushCommand.html">RPOPLPUSH</a></li></ul>
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/LremCommand.html b/doc/LremCommand.html
new file mode 100644
index 000000000..0d7a70c45
--- /dev/null
+++ b/doc/LremCommand.html
@@ -0,0 +1,41 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>LremCommand: Contents</b><br>&nbsp;&nbsp;<a href="#LREM _key_ _count_ _value_">LREM _key_ _count_ _value_</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Return value">Return value</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#See also">See also</a>
+ </div>
+
+ <h1 class="wikiname">LremCommand</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+ <h1><a name="LREM _key_ _count_ _value_">LREM _key_ _count_ _value_</a></h1>
+<i>Time complexity: O(N) (with N being the length of the list)</i><blockquote>Remove the first <i>count</i> occurrences of the <i>value</i> element from the list.If <i>count</i> is zero all the elements are removed. If <i>count</i> is negativeelements are removed from tail to head, instead to go from head to tailthat is the normal behaviour. So for example LREM with count -2 and_hello_ as value to remove against the list (a,b,c,hello,x,hello,hello) willlave the list (a,b,c,hello,x). The number of removed elements is returnedas an integer, see below for more information about the returned value.Note that non existing keys are considered like empty lists by LREM, so LREMagainst non existing keys will always return 0.</blockquote>
+<h2><a name="Return value">Return value</a></h2><a href="ReplyTypes.html">Integer Reply</a>, specifically:<br/><br/><pre class="codeblock python" name="code">
+The number of removed elements if the operation succeeded
+</pre><h2><a name="See also">See also</a></h2>
+<ul><li> <a href="RpushCommand.html">RPUSH</a></li><li> <a href="RpushCommand.html">LPUSH</a></li><li> <a href="LlenCommand.html">LLEN</a></li><li> <a href="LrangeCommand.html">LRANGE</a></li><li> <a href="LtrimCommand.html">LTRIM</a></li><li> <a href="LindexCommand.html">LINDEX</a></li><li> <a href="LsetCommand.html">LSET</a></li><li> <a href="LremCommand.html">LREM</a></li><li> <a href="LpopCommand.html">LPOP</a></li><li> <a href="LpopCommand.html">RPOP</a></li><li> <a href="RpoplpushCommand.html">RPOPLPUSH</a></li></ul>
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/LsetCommand.html b/doc/LsetCommand.html
new file mode 100644
index 000000000..61d83c3b3
--- /dev/null
+++ b/doc/LsetCommand.html
@@ -0,0 +1,39 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>LsetCommand: Contents</b><br>&nbsp;&nbsp;<a href="#LSET _key_ _index_ _value_">LSET _key_ _index_ _value_</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Return value">Return value</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#See also">See also</a>
+ </div>
+
+ <h1 class="wikiname">LsetCommand</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+ <h1><a name="LSET _key_ _index_ _value_">LSET _key_ _index_ _value_</a></h1>
+<i>Time complexity: O(N) (with N being the length of the list)</i><blockquote>Set the list element at <i>index</i> (see LINDEX for information about the_index_ argument) with the new <i>value</i>. Out of range indexes willgenerate an error. Note that setting the first or last elements ofthe list is O(1).</blockquote>
+<h2><a name="Return value">Return value</a></h2><a href="ReplyTypes.html">Status code reply</a><h2><a name="See also">See also</a></h2>
+<ul><li> <a href="RpushCommand.html">RPUSH</a></li><li> <a href="RpushCommand.html">LPUSH</a></li><li> <a href="LlenCommand.html">LLEN</a></li><li> <a href="LrangeCommand.html">LRANGE</a></li><li> <a href="LtrimCommand.html">LTRIM</a></li><li> <a href="LindexCommand.html">LINDEX</a></li><li> <a href="LsetCommand.html">LSET</a></li><li> <a href="LremCommand.html">LREM</a></li><li> <a href="LpopCommand.html">LPOP</a></li><li> <a href="LpopCommand.html">RPOP</a></li><li> <a href="RpoplpushCommand.html">RPOPLPUSH</a></li></ul>
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/LtrimCommand.html b/doc/LtrimCommand.html
new file mode 100644
index 000000000..7dce582ad
--- /dev/null
+++ b/doc/LtrimCommand.html
@@ -0,0 +1,47 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>LtrimCommand: Contents</b><br>&nbsp;&nbsp;<a href="#LTRIM _key_ _start_ _end_">LTRIM _key_ _start_ _end_</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Return value">Return value</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#See also">See also</a>
+ </div>
+
+ <h1 class="wikiname">LtrimCommand</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+ <h1><a name="LTRIM _key_ _start_ _end_">LTRIM _key_ _start_ _end_</a></h1>
+<i>Time complexity: O(n) (with n being len of list - len of range)</i><blockquote>Trim an existing list so that it will contain only the specifiedrange of elements specified. Start and end are zero-based indexes.0 is the first element of the list (the list head), 1 the next elementand so on.</blockquote>
+<blockquote>For example LTRIM foobar 0 2 will modify the list stored at foobarkey so that only the first three elements of the list will remain.</blockquote>
+<blockquote>_start_ and <i>end</i> can also be negative numbers indicating offsetsfrom the end of the list. For example -1 is the last element ofthe list, -2 the penultimate element and so on.</blockquote>
+<blockquote>Indexes out of range will not produce an error: if start is overthe end of the list, or start &gt; end, an empty list is left as value.If end over the end of the list Redis will threat it just likethe last element of the list.</blockquote>
+<blockquote>Hint: the obvious use of LTRIM is together with LPUSH/RPUSH. For example:</blockquote>
+<pre class="codeblock python" name="code">
+ LPUSH mylist &lt;someelement&gt;
+ LTRIM mylist 0 99
+</pre><blockquote>The above two commands will push elements in the list taking care thatthe list will not grow without limits. This is very useful when usingRedis to store logs for example. It is important to note that when usedin this way LTRIM is an O(1) operation because in the average casejust one element is removed from the tail of the list.</blockquote>
+<h2><a name="Return value">Return value</a></h2><a href="ReplyTypes.html">Status code reply</a><h2><a name="See also">See also</a></h2>
+<ul><li> <a href="RpushCommand.html">RPUSH</a></li><li> <a href="RpushCommand.html">LPUSH</a></li><li> <a href="LlenCommand.html">LLEN</a></li><li> <a href="LrangeCommand.html">LRANGE</a></li><li> <a href="LtrimCommand.html">LTRIM</a></li><li> <a href="LindexCommand.html">LINDEX</a></li><li> <a href="LsetCommand.html">LSET</a></li><li> <a href="LremCommand.html">LREM</a></li><li> <a href="LpopCommand.html">LPOP</a></li><li> <a href="LpopCommand.html">RPOP</a></li><li> <a href="RpoplpushCommand.html">RPOPLPUSH</a></li></ul>
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/MgetCommand.html b/doc/MgetCommand.html
new file mode 100644
index 000000000..0e8120f22
--- /dev/null
+++ b/doc/MgetCommand.html
@@ -0,0 +1,52 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>MgetCommand: Contents</b><br>&nbsp;&nbsp;<a href="#MGET _key1_ _key2_ ... _keyN_">MGET _key1_ _key2_ ... _keyN_</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Return value">Return value</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Example">Example</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#See also">See also</a>
+ </div>
+
+ <h1 class="wikiname">MgetCommand</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+ <h1><a name="MGET _key1_ _key2_ ... _keyN_">MGET _key1_ _key2_ ... _keyN_</a></h1>
+<i>Time complexity: O(1) for every key</i><blockquote>Get the values of all the specified keys. If one or more keys dont existor is not of type String, a 'nil' value is returned instead of the valueof the specified key, but the operation never fails.</blockquote>
+<h2><a name="Return value">Return value</a></h2><a href="ReplyTypes.html">Multi bulk reply</a><h2><a name="Example">Example</a></h2><pre class="codeblock python" name="code">
+$ ./redis-cli set foo 1000
++OK
+$ ./redis-cli set bar 2000
++OK
+$ ./redis-cli mget foo bar
+1. 1000
+2. 2000
+$ ./redis-cli mget foo bar nokey
+1. 1000
+2. 2000
+3. (nil)
+$
+</pre><h2><a name="See also">See also</a></h2>
+<ul><li> <a href="GetCommand.html">GET</a></li><li> <a href="SetCommand.html">SET</a></li><li> <a href="SetnxCommand.html">SETNX</a></li><li> <a href="IncrCommand.html">INCR</a></li></ul>
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/MonitorCommand.html b/doc/MonitorCommand.html
new file mode 100644
index 000000000..645968e68
--- /dev/null
+++ b/doc/MonitorCommand.html
@@ -0,0 +1,63 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>MonitorCommand: Contents</b><br>&nbsp;&nbsp;<a href="#MONITOR">MONITOR</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Return value">Return value</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#See also">See also</a>
+ </div>
+
+ <h1 class="wikiname">MonitorCommand</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+ <h1><a name="MONITOR">MONITOR</a></h1><blockquote>MONITOR is a debugging command that outputs the whole sequence of commandsreceived by the Redis server. is very handy in order to understandwhat is happening into the database. This command is used directlyvia telnet.</blockquote>
+<pre class="codeblock python" name="code">
+% telnet 127.0.0.1 6379
+Trying 127.0.0.1...
+Connected to segnalo-local.com.
+Escape character is '^]'.
+MONITOR
++OK
+monitor
+keys *
+dbsize
+set x 6
+foobar
+get x
+del x
+get x
+set key_x 5
+hello
+set key_y 5
+hello
+set key_z 5
+hello
+set foo_a 5
+hello
+</pre><blockquote>The ability to see all the requests processed by the server is useful in orderto spot bugs in the application both when using Redis as a database and asa distributed caching system.</blockquote>
+<blockquote>In order to end a monitoring session just issue a QUIT command by hand.</blockquote>
+<h2><a name="Return value">Return value</a></h2><b>Non standard return value</b>, just dumps the received commands in an infinite flow.<h2><a name="See also">See also</a></h2>
+<ul><li> <a href="InfoCommand.html">INFO</a></li></ul>
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/MoveCommand.html b/doc/MoveCommand.html
new file mode 100644
index 000000000..db14f4bf3
--- /dev/null
+++ b/doc/MoveCommand.html
@@ -0,0 +1,42 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>MoveCommand: Contents</b><br>&nbsp;&nbsp;<a href="#MOVE _key_ _dbindex_">MOVE _key_ _dbindex_</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Return value">Return value</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#See also">See also</a>
+ </div>
+
+ <h1 class="wikiname">MoveCommand</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+ <h1><a name="MOVE _key_ _dbindex_">MOVE _key_ _dbindex_</a></h1>
+<blockquote>Move the specified key from the currently selected DB to the specifieddestination DB. Note that this command returns 1 only if the key wassuccessfully moved, and 0 if the target key was already there or if thesource key was not found at all, so it is possible to use MOVE as a lockingprimitive.</blockquote>
+<h2><a name="Return value">Return value</a></h2><a href="ReplyTypes.html">Integer reply</a>, specifically:<br/><br/><pre class="codeblock python" name="code">
+1 if the key was moved
+0 if the key was not moved because already present on the target DB or was not found in the current DB.
+</pre><h2><a name="See also">See also</a></h2>
+<ul><li> <a href="SelectCommand.html">SELECT</a></li><li> <a href="RenameCommand.html">RENAME</a></li></ul>
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/MsetCommand.html b/doc/MsetCommand.html
new file mode 100644
index 000000000..166f4ac34
--- /dev/null
+++ b/doc/MsetCommand.html
@@ -0,0 +1,44 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>MsetCommand: Contents</b><br>&nbsp;&nbsp;<a href="#MSETNX _key1_ _value1_ _key2_ _value2_ ... _keyN_ _valueN_ (Redis &gt;">MSETNX _key1_ _value1_ _key2_ _value2_ ... _keyN_ _valueN_ (Redis &gt;</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#MSET Return value">MSET Return value</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#MSETNX Return value">MSETNX Return value</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#See also">See also</a>
+ </div>
+
+ <h1 class="wikiname">MsetCommand</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+ &iuml;&raquo;&iquest;= MSET <i>key1</i> <i>value1</i> <i>key2</i> <i>value2</i> ... <i>keyN</i> <i>valueN</i> (Redis &gt;= 1.1) =
+<h1><a name="MSETNX _key1_ _value1_ _key2_ _value2_ ... _keyN_ _valueN_ (Redis &gt;">MSETNX _key1_ _value1_ _key2_ _value2_ ... _keyN_ _valueN_ (Redis &gt;</a></h1> 1.1) =
+<i>Time complexity: O(1) to set every key</i><blockquote>Set the the rispective keys to the rispective values. MSET will replace oldvalues with new values, while MSETNX will not perform any operation at alleven if just a single key already exists.</blockquote>
+<blockquote>Because of this semantic MSETNX can be used in order to set different keysrepresenting different fields of an unique logic object in a way thatensures that either all the fields or none at all are set.</blockquote>
+<blockquote>Both MSET and MSETNX are atomic operations. This means that for instanceif the keys A and B are modified, another client talking to Redis can eithersee the changes to both A and B at once, or no modification at all.</blockquote>
+<h2><a name="MSET Return value">MSET Return value</a></h2><a href="ReplyTypes.html">Status code reply</a> Basically +OK as MSET can't fail<h2><a name="MSETNX Return value">MSETNX Return value</a></h2><a href="ReplyTypes.html">Integer reply</a>, specifically:<br/><br/><pre class="codeblock python" name="code">
+1 if the all the keys were set
+0 if no key was set (at least one key already existed)
+</pre><h2><a name="See also">See also</a></h2><ul><li> <a href="MgetCommand.html">MGET</a></li><li> <a href="DelCommand.html">DEL</a> (DEL supports deleting multiple keys in a single operation)</li></ul>
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/ObjectHashMappers.html b/doc/ObjectHashMappers.html
new file mode 100644
index 000000000..e66a7e421
--- /dev/null
+++ b/doc/ObjectHashMappers.html
@@ -0,0 +1,39 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>ObjectHashMappers: Contents</b><br>&nbsp;&nbsp;<a href="#Object Hash Mappers">Object Hash Mappers</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Ruby">Ruby</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Ohm">Ohm</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#dm-redis-adapter">dm-redis-adapter</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#redis-models">redis-models</a>
+ </div>
+
+ <h1 class="wikiname">ObjectHashMappers</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+
+<h1><a name="Object Hash Mappers">Object Hash Mappers</a></h1>Looking for a higher level if abstraction for your Objects, their Properties and Relationships?<br/><br/>There is not need to stick to the <a href="SupportedLanguages.html">client libraries</a> exposing the raw features of Redis, here you will find a list of <b>Object Hash Mappers</b>, working in the same fashion a ORM does.<h2><a name="Ruby">Ruby</a></h2><h3><a name="Ohm">Ohm</a></h3><ul><li> Object-hash mapping library for Redis. It includes an extensible list of validations and has very good performance.</li><li> Authors: <a href="http://soveran.com/" target="_blank">Michel Martens</a>, <a href="http://twitter.com/soveran" target="_blank">@soveran</a>; and Damian Janowski <a href="http://twitter.com/djanowski" target="_blank">@djanowski</a>.</li><li> Repository: <a href="http://github.com/soveran/ohm" target="_blank">http://github.com/soveran/ohm</a></li><li> Group: <a href="http://groups.google.com/group/ohm-ruby" target="_blank">http://groups.google.com/group/ohm-ruby</a></li></ul>
+<h3><a name="dm-redis-adapter">dm-redis-adapter</a></h3><ul><li> This is a DataMapper (ORM that is based on the IdentityMap pattern) adapter for the Redis key-value database.</li><li> Author: <a href="http://whoahbot.com/" target="_blank">Whoahbot</a>, <a href="http://twitter.com/whoahbot" target="_blank">@whoahbot</a>.</li><li> Repository: <a href="http://github.com/whoahbot/dm-redis-adapter/" target="_blank">http://github.com/whoahbot/dm-redis-adapter/</a></li></ul>
+<h3><a name="redis-models">redis-models</a></h3><ul><li> Minimal model support for Redis. Directly maps Ruby properties to model_name:id:field_name keys in redis. Scalar, List and Set properties are supported. Values can be marshaled to/from Integer, Float, DateTime, JSON. </li><li> Repository: <a href="http://github.com/voloko/redis-model" target="_blank">http://github.com/voloko/redis-model</a></li></ul>
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/Pipelining.html b/doc/Pipelining.html
new file mode 100644
index 000000000..c3f3b4b84
--- /dev/null
+++ b/doc/Pipelining.html
@@ -0,0 +1,36 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>Pipelining: Contents</b><br>&nbsp;&nbsp;<a href="#Pipelining (DRAFT)">Pipelining (DRAFT)</a>
+ </div>
+
+ <h1 class="wikiname">Pipelining</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+ <h1><a name="Pipelining (DRAFT)">Pipelining (DRAFT)</a></h1>A client library can use the same connection in order to issue multiple commands. But Redis supports <b>pipelining</b>, so multiple commands can be sent to the server with a single write operation by the client, without need to read the server reply in order to issue the next command. All the replies can be read at the end.<br/><br/>Usually Redis server and client will have a very fast link so this is not very important to support this feature in a client implementation, still if an application needs to issue a very large number of commands in s short time, using pipelining can be much faster.<br/><br/>Please read the <a href="ProtocolSpecification.html">ProtocolSpecification</a> if you want to learn more about the way Redis <a href="SupportedLanguages.html">clients</a> and the server communicate.<br/><br/>Pipelining is one of the <a href="Speed.html">Speed</a> <a href="Features.html">Features</a> of Redis, you can also check the support for <a href="MultiBulkCommands.html">send and receive multiple values in a single command</a>.
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/ProgrammingExamples.html b/doc/ProgrammingExamples.html
new file mode 100644
index 000000000..9dc04b8e9
--- /dev/null
+++ b/doc/ProgrammingExamples.html
@@ -0,0 +1,38 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>ProgrammingExamples: Contents</b><br>&nbsp;&nbsp;<a href="#Programming Examples (DRAFT)">Programming Examples (DRAFT)</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#TODO">TODO</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Java">Java</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Twayis">Twayis</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#PHP">PHP</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Retwis">Retwis</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Ruby">Ruby</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#twatcher-lite">twatcher-lite</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Resque">Resque</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Retwis-rb">Retwis-rb</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#scanty-redis">scanty-redis</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Note Taking">Note Taking</a>
+ </div>
+
+ <h1 class="wikiname">ProgrammingExamples</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+
+<h1><a name="Programming Examples (DRAFT)">Programming Examples (DRAFT)</a></h1><h2><a name="TODO">TODO</a></h2><ul><li> Add <a href="http://github.com/jodosha/redis-store" target="_blank">http://github.com/jodosha/redis-store</a></li></ul>
+Nothing speaks better than code examples, here you are:<h2><a name="Java">Java</a></h2><h3><a name="Twayis">Twayis</a></h3> <br/><br/>A Java clone of <b>Retwis</b> showcase integration between the <a href="http://www.playframework.org/" target="_blank">Play! framework</a> and Redis <a href="http://code.google.com/p/twayis/" target="_blank">Google Code Project Page</a><h2><a name="PHP">PHP</a></h2><h3><a name="Retwis">Retwis</a></h3>A PHP Twitter clone, the original example of Redis capabilities. With a <a href="http://retwis.antirez.com/" target="_blank">live demo</a>, and an <a href="http://code.google.com/p/redis/wiki/TwitterAlikeExample" target="_blank">article explaining it design</a>. You can find the code in the Downloads tab.<h2><a name="Ruby">Ruby</a></h2><h3><a name="twatcher-lite">twatcher-lite</a></h3>A simplied version of the application running <a href="http://twatcher.com/" target="_blank">http://twatcher.com/</a> from Mirko Froehlich (<a href="http://twitter.com/digitalhobbit" target="_blank">@digitalhobbit</a>) with a full blog post explaining its development at <a href="http://www.digitalhobbit.com/2009/11/08/building-a-twitter-filter-with-sinatra-redis-and-tweetstream/" target="_blank"> Building a Twitter Filter With Sinatra, Redis, and TweetStream</a><h3><a name="Resque">Resque</a></h3>The &quot;simple&quot; Redis-based queue behind Github background jobs, that replaced SQS, Starling, ActiveMessaging, BackgroundJob, DelayedJob, and Beanstalkd. Developed by Chris Wanstrath (<a href="http://twitter.com/defunkt" target="_blank">@defunkt</a>) the code is at <a href="http://github.com/defunkt/resque" target="_blank">http://github.com/defunkt/resque</a>, be sure to read <a href="http://github.com/blog/542-introducing-resque" target="_blank">the introduction</a><h3><a name="Retwis-rb">Retwis-rb</a></h3>A port of <b>Retwis</b> to Ruby and <a href="http://www.sinatrarb.com/" target="_blank">Sinatra</a> written by Daniel Lucraft (<a href="http://twitter.com/DanLucraft" target="_blank">@DanLucraft</a>) Full source code is available at <a href="http://github.com/danlucraft/retwis-rb" target="_blank">http://github.com/danlucraft/retwis-rb</a><h3><a name="scanty-redis">scanty-redis</a></h3>Scanty is <i>minimal</i> blogging software developed by Adam Wiggins (<a href="http://twitter.com/hirodusk" target="_blank">@hirodusk</a>) It is not a blogging engine, but it&acirc;€™s small and easy to modify, so it could be the starting point for your blog. <a href="http://github.com/adamwiggins/scanty-redis" target="_blank">This fork</a> is modified to use Redis, a full featured key-value database, instead of SQL. <h3><a name="Note Taking">Note Taking</a></h3>A <i>very simple</i> note taking example of Ruby and Redis application using <a href="http://www.sinatrarb.com/" target="_blank">Sinatra</a>. Developed by Pieter Noordhuis <a href="http://twitter.com/pnoordhuis" target="_blank">@pnoordhuis</a>, you can check the code at <a href="http://gist.github.com/86714" target="_blank">http://gist.github.com/86714</a>
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/ProtocolSpecification.html b/doc/ProtocolSpecification.html
new file mode 100644
index 000000000..686c574e8
--- /dev/null
+++ b/doc/ProtocolSpecification.html
@@ -0,0 +1,142 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>ProtocolSpecification: Contents</b><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Networking layer">Networking layer</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Simple INLINE commands">Simple INLINE commands</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Bulk commands">Bulk commands</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Bulk replies">Bulk replies</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Multi-Bulk replies">Multi-Bulk replies</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Nil elements in Multi-Bulk replies">Nil elements in Multi-Bulk replies</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Single line reply">Single line reply</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Integer reply">Integer reply</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Multi bulk commands">Multi bulk commands</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Multiple commands and pipelining">Multiple commands and pipelining</a>
+ </div>
+
+ <h1 class="wikiname">ProtocolSpecification</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+ &iuml;&raquo;&iquest;= Protocol Specification =<br/><br/>The Redis protocol is a compromise between being easy to parse by a computer
+and being easy to parse by an human. Before reading this section you are
+strongly encouraged to read the &quot;REDIS TUTORIAL&quot; section of this README in order
+to get a first feeling of the protocol playing with it by TELNET.<h2><a name="Networking layer">Networking layer</a></h2>A client connects to a Redis server creating a TCP connection to the port 6379.
+Every redis command or data transmitted by the client and the server is
+terminated by &quot;\r\n&quot; (CRLF).<h2><a name="Simple INLINE commands">Simple INLINE commands</a></h2>The simplest commands are the inline commands. This is an example of a
+server/client chat (the server chat starts with S:, the client chat with C:)<br/><br/><pre class="codeblock python" name="code">
+C: PING
+S: +PONG
+</pre>An inline command is a CRLF-terminated string sent to the client. The server can reply to commands in different ways:
+<ul><li> With an error message (the first byte of the reply will be &quot;-&quot;)</li><li> With a single line reply (the first byte of the reply will be &quot;+)</li><li> With bulk data (the first byte of the reply will be &quot;$&quot;)</li><li> With multi-bulk data, a list of values (the first byte of the reply will be &quot;<code name="code" class="python">*</code>&quot;)</li><li> With an integer number (the first byte of the reply will be &quot;:&quot;)</li></ul>
+The following is another example of an INLINE command returning an integer:<br/><br/><pre class="codeblock python python" name="code">
+C: EXISTS somekey
+S: :0
+</pre>Since 'somekey' does not exist the server returned ':0'.<br/><br/>Note that the EXISTS command takes one argument. Arguments are separated
+simply by spaces.<h2><a name="Bulk commands">Bulk commands</a></h2>A bulk command is exactly like an inline command, but the last argument
+of the command must be a stream of bytes in order to send data to the server.
+the &quot;SET&quot; command is a bulk command, see the following example:<br/><br/><pre class="codeblock python python python" name="code">
+C: SET mykey 6
+C: foobar
+S: +OK
+</pre>The last argument of the commnad is '6'. This specify the number of DATA
+bytes that will follow (note that even this bytes are terminated by two
+additional bytes of CRLF).<br/><br/>All the bulk commands are in this exact form: instead of the last argument
+the number of bytes that will follow is specified, followed by the bytes,
+and CRLF. In order to be more clear for the programmer this is the string
+sent by the client in the above sample:<br/><br/><blockquote>&quot;SET mykey 6\r\nfoobar\r\n&quot;</blockquote>
+<h2><a name="Bulk replies">Bulk replies</a></h2>The server may reply to an inline or bulk command with a bulk reply. See
+the following example:<br/><br/><pre class="codeblock python python python python" name="code">
+C: GET mykey
+S: $6
+S: foobar
+</pre>A bulk reply is very similar to the last argument of a bulk command. The
+server sends as the first line a &quot;$&quot; byte followed by the number of bytes
+of the actual reply followed by CRLF, then the bytes are sent followed by
+additional two bytes for the final CRLF. The exact sequence sent by the
+server is:<br/><br/><blockquote>&quot;$6\r\nfoobar\r\n&quot;</blockquote>
+If the requested value does not exist the bulk reply will use the special
+value -1 as data length, example:<br/><br/><pre class="codeblock python python python python python" name="code">
+C: GET nonexistingkey
+S: $-1
+</pre>The client library API should not return an empty string, but a nil object, when the requested object does not exist.
+For example a Ruby library should return 'nil' while a C library should return
+NULL, and so forth.<h2><a name="Multi-Bulk replies">Multi-Bulk replies</a></h2>Commands similar to LRANGE needs to return multiple values (every element
+of the list is a value, and LRANGE needs to return more than a single element). This is accomplished using multiple bulk writes,
+prefixed by an initial line indicating how many bulk writes will follow.
+The first byte of a multi bulk reply is always <code name="code" class="python">*</code>. Example:<br/><br/><pre class="codeblock python python python python python python" name="code">
+C: LRANGE mylist 0 3
+S: *4
+S: $3
+S: foo
+S: $3
+S: bar
+S: $5
+S: Hello
+S: $5
+S: World
+</pre>The first line the server sent is &quot;<b>4\r\n&quot; in order to specify that four bulk
+write will follow. Then every bulk write is transmitted.<br/><br/>If the specified key does not exist instead of the number of elements in the
+list, the special value -1 is sent as count. Example:<br/><br/><pre class="codeblock python python python python python python python" name="code">
+C: LRANGE nokey 0 1
+S: *-1
+</pre>A client library API SHOULD return a nil object and not an empty list when this
+happens. This makes possible to distinguish between empty list and non existing ones.<h2><a name="Nil elements in Multi-Bulk replies">Nil elements in Multi-Bulk replies</a></h2>Single elements of a multi bulk reply may have -1 length, in order to signal that this elements are missing and not empty strings. This can happen with the SORT command when used with the GET <i>pattern</i> option when the specified key is missing. Example of a multi bulk reply containing an empty element:<br/><br/><pre class="codeblock python python python python python python python python" name="code">
+S: *3
+S: $3
+S: foo
+S: $-1
+S: $3
+S: bar
+</pre>The second element is nul. The client library should return something like this:<br/><br/><pre class="codeblock python python python python python python python python python" name="code">
+[&quot;foo&quot;,nil,&quot;bar&quot;]
+</pre><h2><a name="Single line reply">Single line reply</a></h2>As already seen a single line reply is in the form of a single line string
+starting with &quot;+&quot; terminated by &quot;\r\n&quot;. For example:<br/><br/><pre class="codeblock python python python python python python python python python python" name="code">
++OK
+</pre>The client library should return everything after the &quot;+&quot;, that is, the string &quot;OK&quot; in the example.<br/><br/>The following commands reply with a status code reply:
+PING, SET, SELECT, SAVE, BGSAVE, SHUTDOWN, RENAME, LPUSH, RPUSH, LSET, LTRIM<h2><a name="Integer reply">Integer reply</a></h2>This type of reply is just a CRLF terminated string representing an integer, prefixed by a &quot;:&quot; byte. For example &quot;:0\r\n&quot;, or &quot;:1000\r\n&quot; are integer replies.<br/><br/>With commands like INCR or LASTSAVE using the integer reply to actually return a value there is no special meaning for the returned integer. It is just an incremental number for INCR, a UNIX time for LASTSAVE and so on.<br/><br/>Some commands like EXISTS will return 1 for true and 0 for false.<br/><br/>Other commands like SADD, SREM and SETNX will return 1 if the operation was actually done, 0 otherwise.<br/><br/>The following commands will reply with an integer reply: SETNX, DEL, EXISTS, INCR, INCRBY, DECR, DECRBY, DBSIZE, LASTSAVE, RENAMENX, MOVE, LLEN, SADD, SREM, SISMEMBER, SCARD<h2><a name="Multi bulk commands">Multi bulk commands</a></h2>As you can see with the protocol described so far there is no way to
+send multiple binary-safe arguments to a command. With bulk commands the
+last argument is binary safe, but there are commands where multiple binary-safe
+commands are needed, like the MSET command that is able to SET multiple keys
+in a single operation.<br/><br/>In order to address this problem Redis 1.1 introduced a new way of seding
+commands to a Redis server, that uses exactly the same protocol of the
+multi bulk replies. For instance the following is a SET command using the
+normal bulk protocol:<br/><br/><pre class="codeblock python python python python python python python python python python python" name="code">
+SET mykey 8
+myvalue
+</pre>While the following uses the multi bulk command protocol:<br/><br/><pre class="codeblock python python python python python python python python python python python python" name="code">
+*3
+$3
+SET
+$5
+mykey
+$8
+myvalue
+</pre>Commands sent in this format are longer, so currently they are used only in
+order to transmit commands containing multiple binary-safe arguments, but
+actually this protocol can be used to send every kind of command, without to
+know if it's an inline, bulk or multi-bulk command.<br/><br/>It is possible that in the future Redis will support only this format.<br/><br/>A good client library may implement unknown commands using this
+command format in order to support new commands out of the box without
+modifications.<h2><a name="Multiple commands and pipelining">Multiple commands and pipelining</a></h2>A client can use the same connection in order to issue multiple commands.
+Pipelining is supported so multiple commands can be sent with a single
+write operation by the client, it is not needed to read the server reply
+in order to issue the next command. All the replies can be read at the end.<br/><br/>Usually Redis server and client will have a very fast link so this is not
+very important to support this feature in a client implementation, still
+if an application needs to issue a very large number of commands in short
+time to use pipelining can be much faster.
+</b>
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/QuickStart.html b/doc/QuickStart.html
new file mode 100644
index 000000000..8d25145e3
--- /dev/null
+++ b/doc/QuickStart.html
@@ -0,0 +1,78 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>QuickStart: Contents</b><br>&nbsp;&nbsp;<a href="#Quick Start">Quick Start</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Obtain the latest version">Obtain the latest version</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Compile">Compile</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Run the server">Run the server</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Play with the built in client">Play with the built in client</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Further reading">Further reading</a>
+ </div>
+
+ <h1 class="wikiname">QuickStart</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+ <h1><a name="Quick Start">Quick Start</a></h1>This quickstart is a five minutes howto on how to get started with Redis. For more information on Redis check <a href="http://code.google.com/p/redis/wiki/index" target="_blank">Redis Documentation Index</a>.<h2><a name="Obtain the latest version">Obtain the latest version</a></h2>The latest stable source distribution of Redis can be obtained <a href="http://code.google.com/p/redis/downloads/list" target="_blank">at this location as a tarball</a>.<br/><br/><pre class="codeblock python" name="code">
+$ wget http://redis.googlecode.com/files/redis-1.02.tar.gz
+</pre>The unstable source code, with more features but not ready for production, can be downloaded using git:<br/><br/><pre class="codeblock python python" name="code">
+$ git clone git://github.com/antirez/redis.git
+</pre><h2><a name="Compile">Compile</a></h2>Redis can be compiled in most <a href="SupportedPlatforms.html">POSIX systems</a>. To compile Redis just untar the tar.gz, enter the directly and type 'make'.<br/><br/><pre class="codeblock python python python" name="code">
+$ tar xvzf redis-1.02.tar.gz
+$ cd redis-1.02
+$ make
+</pre>In order to test if the Redis server is working well in your computer make sure to run <code name="code" class="python">make test</code> and check that all the tests are passed.<h2><a name="Run the server">Run the server</a></h2>Redis can run just fine without a configuration file (when executed without a config file a standard configuration is used). To run Redis just type the following command:<br/><br/><pre class="codeblock python python python python" name="code">
+$ ./redis-server
+</pre>With the <a href="Configuration.html">default configuration</a> Redis will log to the standard output so you can check what happens. Later, you can <a href="Configuration.html">change the default settings</a>.<h2><a name="Play with the built in client">Play with the built in client</a></h2>Redis ships with a command line client that is automatically compiled when you ran <code name="code" class="python">make</code> and it is called <code name="code" class="python">redis-cli</code>For instance to set a key and read back the value use the following:<br/><br/><pre class="codeblock python python python python python" name="code">
+$ ./redis-cli set mykey somevalue
+OK
+$ ./redis-cli get mykey
+somevalue
+</pre>What about adding elements to a <a href="Lists.html">list</a>:<br/><br/><pre class="codeblock python python python python python python" name="code">
+$ ./redis-cli lpush mylist firstvalue
+OK
+$ ./redis-cli lpush mylist secondvalue
+OK
+$ ./redis-cli lpush mylist thirdvalue
+OK
+$ ./redis-cli lrange mylist 0 -1
+1. thirdvalue
+2. secondvalue
+3. firstvalue
+$ ./redis-cli rpop mylist
+firstvalue
+$ ./redis-cli lrange mylist 0 -1
+1. thirdvalue
+2. secondvalue
+</pre><a href="Lists.html">Lists</a> (and <a href="Sets.html">Sets</a> too) can be sorted:<br/><br/><pre class="codeblock python python python python python python python" name="code">
+./redis-cli sort mylist alpha
+1. secondvalue
+2. thirdvalue
+</pre>And despite Redis doesn't have integers, you can do some math also:<br/><br/><pre class="codeblock python python python python python python python python" name="code">
+$ ./redis-cli get mycounter
+(nil)
+$ ./redis-cli incr mycounter
+1
+./redis-cli incr mycounter
+2
+</pre><h2><a name="Further reading">Further reading</a></h2><ul><li> Check all the <a href="Features.html">Features</a></li><li> Read the full list of available commands in the <a href="CommandReference.html">Command Reference</a>.</li><li> Start using Redis from your <a href="SupportedLanguages.html">favorite language</a>.</li><li> Take a look at some <a href="ProgrammingExamples.html">Programming Examples</a>. </li></ul>
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/QuitCommand.html b/doc/QuitCommand.html
new file mode 100644
index 000000000..c1508dce3
--- /dev/null
+++ b/doc/QuitCommand.html
@@ -0,0 +1,38 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>QuitCommand: Contents</b><br>&nbsp;&nbsp;<a href="#Quit">Quit</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Return value">Return value</a>
+ </div>
+
+ <h1 class="wikiname">QuitCommand</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+ <h1><a name="Quit">Quit</a></h1><blockquote>Ask the server to silently close the connection.</blockquote>
+<h2><a name="Return value">Return value</a></h2>None. The connection is closed as soon as the QUIT command is received.
+
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/README.html b/doc/README.html
new file mode 100644
index 000000000..38242aa04
--- /dev/null
+++ b/doc/README.html
@@ -0,0 +1,110 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>README: Contents</b><br>&nbsp;&nbsp;<a href="#Introduction">Introduction</a><br>&nbsp;&nbsp;<a href="#Beyond key-value databases">Beyond key-value databases</a><br>&nbsp;&nbsp;<a href="#What are the differences between Redis and Memcached?">What are the differences between Redis and Memcached?</a><br>&nbsp;&nbsp;<a href="#What are the differences between Redis and Tokyo Cabinet / Tyrant?">What are the differences between Redis and Tokyo Cabinet / Tyrant?</a><br>&nbsp;&nbsp;<a href="#Does Redis support locking?">Does Redis support locking?</a><br>&nbsp;&nbsp;<a href="#Multiple databases support">Multiple databases support</a><br>&nbsp;&nbsp;<a href="#Redis Data Types">Redis Data Types</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Implementation Details">Implementation Details</a><br>&nbsp;&nbsp;<a href="#Redis Tutorial">Redis Tutorial</a><br>&nbsp;&nbsp;<a href="#License">License</a><br>&nbsp;&nbsp;<a href="#Credits">Credits</a>
+ </div>
+
+ <h1 class="wikiname">README</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+ <h1><a name="Introduction">Introduction</a></h1>Redis is a database. To be specific, Redis is a very simple database implementing a dictionary, where every key is associated with a value. For example I can set the key &quot;surname_1992&quot; to the string &quot;Smith&quot;.
+What makes Redis different from many other key-value stores, is that every single value has a type. The following types are supported:<br/><br/><ul><li> String</li><li> List</li><li> Set</li><li> Sorted Set (since version 1.1)</li></ul>
+The type of a value determines what operations (called commands) are available for the value itself.
+For example you can append elements to a list stored at the key &quot;mylist&quot; using the LPUSH or RPUSH command in O(1). Later you'll be able to get a range of elements with LRANGE or trim the list with LTRIM. Sets are very flexible too, it is possible to add and remove elements from Sets (unsorted collections of strings), and then ask for server-side intersection, union, difference of Sets. Each command is performed through server-side atomic operations.
+Please refer to the <a href="CommandReference.html">Command Reference</a> to see the full list of operations associated to these data types.<br/><br/>In other words, you can look at Redis as a data structures server. A Redis user is virtually provided with an interface to <a href="http://en.wikipedia.org/wiki/Abstract_data_type" target="_blank">Abstract Data Types</a>, saving her from the responsibility to implement concrete data structures and algorithms. Indeed both algorithms and data structures in Redis are properly choosed in order to obtain the best performance.<br/><br/>Redis loads and mantains the whole dataset into memory, but the dataset is persistent, since from time to time Redis writes a dump on disk asynchronously. The dataset is loaded from the dump every time the server is (re)started.<br/><br/>Redis can be configured to save the dataset when a certain number of changes is reached and after a given number of seconds elapses. For example, you can configure Redis to save after 1000 changes and at most 60 seconds since the last save. You can specify any combination for these numbers.<br/><br/>Because data is written asynchronously, when a system crash occurs, the last few queries can get lost (that is acceptable in many applications). Anyway it is possible to make this a non issue, since Redis supports master-slave replication from its early days, being effective even in the case where a few records lost are not acceptable.<h1><a name="Beyond key-value databases">Beyond key-value databases</a></h1>All these features allow to use Redis as the sole DB for your scalable application without the need of any relational database. <a href="TwitterAlikeExample.html">We wrote a simple Twitter clone in PHP + Redis</a> to show a real world example, the link points to an article explaining the design and internals in very simple words.<h1><a name="What are the differences between Redis and Memcached?">What are the differences between Redis and Memcached?</a></h1>In the following ways:<br/><br/><ul><li> Memcached is not persistent, it just holds everything in memory without saving since its main goal is to be used as a cache. Redis instead can be used as the main DB for the application. We <a href="TwitterAlikeExample.html">wrote a simple Twitter clone</a> using only Redis as database.</li></ul>
+<ul><li> Like memcached Redis uses a key-value model, but while keys can just be strings, values in Redis can be lists and sets, and complex operations like intersections, set/get n-th element of lists, pop/push of elements, can be performed against sets and lists. It is possible to use lists as message queues.</li></ul>
+<h1><a name="What are the differences between Redis and Tokyo Cabinet / Tyrant?">What are the differences between Redis and Tokyo Cabinet / Tyrant?</a></h1>Redis and Tokyo Cabinet can be used for the same applications, but actually they are <b>very</b> different beasts. If you read twitter messages of people involved in scalable things both products are reported to work well, but surely there are times where one or the other can be the best choice. Some differences are the followings (I may be biased, make sure to check yourself both the products).<br/><br/><ul><li> Tokyo Cabinet writes synchronously on disk, Redis takes the whole dataset on memory and writes on disk asynchronously. Tokyo Cabinet is safer and probably a better idea if your dataset is going to be bigger than RAM, but Redis is faster (note that Redis supports master-slave replication that is trivial to setup, so you are safe anyway if you want a setup where data can't be lost even after a disaster).</li></ul>
+<ul><li> Redis supports higher level operations and data structures. Tokyo Cabinet supports a kind of database that is able to organize data into rows with named fields (in a way very similar to Berkeley DB) but can't do things like server side List and Set operations Redis is able to do: pushing or popping from Lists in an atomic way, in O(1) time complexity, server side Set intersections, <a href="SORT.html">SortCommand</a> ing of schema free data in complex ways (Btw TC supports sorting in the table-based database format). Redis on the other hand does not support the abstraction of tables with fields, the idea is that you can build this stuff in software easily if you really need a table-alike approach.</li></ul>
+<ul><li> Tokyo Cabinet does not implement a networking layer. You have to use a networking layer called Tokyo Tyrant that interfaces to Tokyo Cabinet so you can talk to Tokyo Cabinet in a client-server fashion. In Redis the networking support is built-in inside the server, and is basically the only interface between the external world and the dataset.</li></ul>
+<ul><li> Redis is reported to be much faster, especially if you plan to access Tokyo Cabinet via Tokyo Tyrant. Here I can only say that with Redis you can expect 100,000 operations/seconds with a normal Linux box and 50 concurrent clients. You should test Redis, Tokyo, and the other alternatives with your specific work load to get a feeling about performances for your application.</li></ul>
+<ul><li> Redis is (IMHO) generally an higher level and simpler to use beast in the operations supported, and to get started. <a href="Check.html">the command reference CommandReference</a> to get a feeling. You can even start playing with Redis by telnet after reading the five minutes tutorial at the end of this README file. To implement new client libraries is trivial. <a href="Check.html">the protocol specification ProtocolSpecification</a> for more information.</li></ul><blockquote></blockquote><ul><li> Redis is not an on-disk DB engine like Tokyo: the latter can be used as a fast DB engine in your C project without the networking overhead just linking to the library. Still in many scalable applications you need multiple servers talking with multiple clients, so the client-server model is almost always needed, this is why in Redis this is built-in.</li></ul>
+<h1><a name="Does Redis support locking?">Does Redis support locking?</a></h1>No, the idea is to provide atomic primitives in order to make the programmer
+able to use redis with locking free algorithms. For example imagine you have
+10 computers and one Redis server. You want to count words in a very large text.
+This large text is split among the 10 computers, every computer will process
+its part and use Redis's INCR command to atomically increment a counter
+for every occurrence of the word found.<br/><br/>INCR/DECR are not the only atomic primitives, there are others like PUSH/POP
+on lists, POP RANDOM KEY operations, UPDATE and so on. For example you can
+use Redis like a Tuple Space (<a href="http://en.wikipedia.org/wiki/Tuple_space" target="_blank">http://en.wikipedia.org/wiki/Tuple_space</a>) in
+order to implement distributed algorithms.<br/><br/>(News: locking with key-granularity is now planned)<h1><a name="Multiple databases support">Multiple databases support</a></h1>Another synchronization primitive is the support for multiple DBs. By default DB 0 is selected for every new connection, but using the SELECT command it is possible to select a different database. The MOVE operation can move an item from one DB to another atomically. This can be used as a base for locking free algorithms together with the 'RANDOMKEY' commands.<h1><a name="Redis Data Types">Redis Data Types</a></h1>Redis supports the following three data types as values:<br/><br/><ul><li> Strings: just any sequence of bytes. Redis strings are binary safe so they can not just hold text, but images, compressed data and everything else.</li><li> Lists: lists of strings, with support for operations like append a new string on head, on tail, list length, obtain a range of elements, truncate the list to a given length, sort the list, and so on.</li><li> Sets: an unsorted set of strings. It is possible to add or delete elements from a set, to perform set intersection, union, subtraction, and so on.</li></ul>
+Values can be Strings, Lists or Sets. Keys can be a subset of strings not containing newlines (&quot;\n&quot;) and spaces (&quot; &quot;).<br/><br/>Note that sometimes strings may hold numeric vaules that must be parsed by
+Redis. An example is the INCR command that atomically increments the number
+stored at the specified key. In this case Redis is able to handle integers
+that can be stored inside a 'long long' type, that is a 64-bit signed integer.<h2><a name="Implementation Details">Implementation Details</a></h2>Strings are implemented as dynamically allocated strings of characters.
+Lists are implemented as doubly linked lists with cached length.
+Sets are implemented using hash tables that use chaining to resolve collisions.<h1><a name="Redis Tutorial">Redis Tutorial</a></h1>(note, you can skip this section if you are only interested in &quot;formal&quot; doc.)<br/><br/>Later in this document you can find detailed information about Redis commands,
+the protocol specification, and so on. This kind of documentation is useful
+but... if you are new to Redis it is also BORING! The Redis protocol is designed
+so that is both pretty efficient to be parsed by computers, but simple enough
+to be used by humans just poking around with the 'telnet' command, so this
+section will show to the reader how to play a bit with Redis to get an initial
+feeling about it, and how it works.<br/><br/>To start just compile redis with 'make' and start it with './redis-server'.
+The server will start and log stuff on the standard output, if you want
+it to log more edit redis.conf, set the loglevel to debug, and restart it.<br/><br/>You can specify a configuration file as unique parameter:<br/><br/><blockquote>./redis-server /etc/redis.conf</blockquote>
+This is NOT required. The server will start even without a configuration file
+using a default built-in configuration.<br/><br/>Now let's try to set a key to a given value:<br/><br/><pre class="codeblock python" name="code">
+$ telnet localhost 6379
+Trying 127.0.0.1...
+Connected to localhost.
+Escape character is '^]'.
+SET foo 3
+bar
++OK
+</pre>The first line we sent to the server is &quot;set foo 3&quot;. This means &quot;set the key
+foo with the following three bytes I'll send you&quot;. The following line is
+the &quot;bar&quot; string, that is, the three bytes. So the effect is to set the
+key &quot;foo&quot; to the value &quot;bar&quot;. Very simple!<br/><br/>(note that you can send commands in lowercase and it will work anyway,
+commands are not case sensitive)<br/><br/>Note that after the first and the second line we sent to the server there
+is a newline at the end. The server expects commands terminated by &quot;\r\n&quot;
+and sequence of bytes terminated by &quot;\r\n&quot;. This is a minimal overhead from
+the point of view of both the server and client but allows us to play with
+Redis with the telnet command easily.<br/><br/>The last line of the chat between server and client is &quot;+OK&quot;. This means
+our key was added without problems. Actually SET can never fail but
+the &quot;+OK&quot; sent lets us know that the server received everything and
+the command was actually executed.<br/><br/>Let's try to get the key content now:<br/><br/><pre class="codeblock python python" name="code">
+GET foo
+$3
+bar
+</pre>Ok that's very similar to 'set', just the other way around. We sent &quot;get foo&quot;,
+the server replied with a first line that is just the $ character follwed by
+the number of bytes the value stored at key contained, followed by the actual
+bytes. Again &quot;\r\n&quot; are appended both to the bytes count and the actual data. In Redis slang this is called a bulk reply.<br/><br/>What about requesting a non existing key?<br/><br/><pre class="codeblock python python python" name="code">
+GET blabla
+$-1
+</pre>When the key does not exist instead of the length, just the &quot;$-1&quot; string is sent. Since a -1 length of a bulk reply has no meaning it is used in order to specifiy a 'nil' value and distinguish it from a zero length value. Another way to check if a given key exists or not is indeed the EXISTS command:<br/><br/><pre class="codeblock python python python python" name="code">
+EXISTS nokey
+:0
+EXISTS foo
+:1
+</pre>As you can see the server replied ':0' the first time since 'nokey' does not
+exist, and ':1' for 'foo', a key that actually exists. Replies starting with the colon character are integer reply.<br/><br/>Ok... now you know the basics, read the <a href="CommandReference.html">REDIS COMMAND REFERENCE</a> section to
+learn all the commands supported by Redis and the <a href="ProtocolSpecification.html">PROTOCOL SPECIFICATION</a>
+section for more details about the protocol used if you plan to implement one
+for a language missing a decent client implementation.<h1><a name="License">License</a></h1>Redis is released under the BSD license. See the COPYING file for more information.<h1><a name="Credits">Credits</a></h1>Redis is written and maintained by Salvatore Sanfilippo, Aka 'antirez'.<br/><br/>Enjoy,
+antirez
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/RandomkeyCommand.html b/doc/RandomkeyCommand.html
new file mode 100644
index 000000000..8714f4c68
--- /dev/null
+++ b/doc/RandomkeyCommand.html
@@ -0,0 +1,39 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>RandomkeyCommand: Contents</b><br>&nbsp;&nbsp;<a href="#RANDOMKEY">RANDOMKEY</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Return value">Return value</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#See also">See also</a>
+ </div>
+
+ <h1 class="wikiname">RandomkeyCommand</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+ <h1><a name="RANDOMKEY">RANDOMKEY</a></h1>
+<i>Time complexity: O(1)</i><blockquote>Return a randomly selected key from the currently selected DB.</blockquote>
+<h2><a name="Return value">Return value</a></h2><a href="ReplyTypes.html">Singe line reply</a>, specifically the randomly selected key or an empty string is the database is empty.<h2><a name="See also">See also</a></h2>
+<ul><li> <a href="KeysCommand.html">KEYS</a></li></ul>
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/Redis0100ChangeLog.html b/doc/Redis0100ChangeLog.html
new file mode 100644
index 000000000..26b32ac26
--- /dev/null
+++ b/doc/Redis0100ChangeLog.html
@@ -0,0 +1,67 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>Redis0100ChangeLog: Contents</b><br>&nbsp;&nbsp;<a href="#Redis 0.100 Changelog">Redis 0.100 Changelog</a>
+ </div>
+
+ <h1 class="wikiname">Redis0100ChangeLog</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+ <h1><a name="Redis 0.100 Changelog">Redis 0.100 Changelog</a></h1>
+<pre class="codeblock python" name="code">
+- SUNION, SDIFF, SUNIONSTORE, SDIFFSTORE commands implemented. (Aman Gupta, antirez)
+- Non blocking replication. Now while N slaves are synchronizing, the master will continue to ask to client queries. (antirez)
+- PHP client ported to PHP5 (antirez)
+- FLUSHALL/FLUSHDB no longer sync on disk. Just increment the dirty counter by the number of elements removed, that will probably trigger a background saving operation (antirez)
+- INCRBY/DECRBY now support 64bit increments, with tests (antirez)
+- New fields in INFO command, bgsave_in_progress and replication related (antirez)
+- Ability to specify a different file name for the DB (... can't remember ...)
+- GETSET command, atomic GET + SET (antirez)
+- SMOVE command implemented, atomic move-element across sets operation (antirez)
+- Ability to work with huge data sets, tested up to 350 million keys (antirez)
+- Warns if /proc/sys/vm/overcommit_memory is set to 0 on Linux. Also make sure to don't resize the hash tables while the child process is saving in order to avoid copy-on-write of memory pages (antirez)
+- Infinite number of arguments for MGET and all the other commands (antirez)
+- CPP client (Brian Hammond)
+- DEL is now a vararg, IMPORTANT: memory leak fixed in loading DB code (antirez)
+- Benchmark utility now supports random keys (antirez)
+- Timestamp in log lines (antirez)
+- Fix SINTER/UNIONSTORE to allow for &amp;=/|= style operations (i.e. SINTERSTORE set1 set1 set2) (Aman Gupta)
+- Partial qsort implemented in SORT command, only when both BY and LIMIT is used (antirez)
+- Allow timeout=0 config to disable client timeouts (Aman Gupta)
+- Alternative (faster/simpler) ruby client API compatible with Redis-rb (antirez)
+- S*STORE now return the cardinality of the resulting set (antirez)
+- TTL command implemented (antirez)
+- Critical bug about glueoutputbuffers=yes fixed. Under load and with pipelining and clients disconnecting on the middle of the chat with the server, Redis could block. (antirez)
+- Different replication fixes (antirez)
+- SLAVEOF command implemented for remote replication management (antirez)
+- Issue with redis-client used in scripts solved, now to check if the latest argument must come from standard input we do not check that stdin is or not a tty but the command arity (antirez)
+- Warns if using the default config (antirez)
+- maxclients implemented, see redis.conf for details (antirez)
+- max bytes of a received command enlarged from 1k to 32k (antirez)
+</pre>
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/Redis0900ChangeLog.html b/doc/Redis0900ChangeLog.html
new file mode 100644
index 000000000..e2e360fb6
--- /dev/null
+++ b/doc/Redis0900ChangeLog.html
@@ -0,0 +1,56 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>Redis0900ChangeLog: Contents</b><br>&nbsp;&nbsp;<a href="#CHANGELOG for Redis 0.900">CHANGELOG for Redis 0.900</a>
+ </div>
+
+ <h1 class="wikiname">Redis0900ChangeLog</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+ <h1><a name="CHANGELOG for Redis 0.900">CHANGELOG for Redis 0.900</a></h1><pre class="codeblock python" name="code">
+2009-06-16 client libraries updated (antirez)
+2009-06-16 Better handling of background saving process killed or crashed (antirez)
+2009-06-14 number of keys info in INFO command (Diego Rosario Brogna)
+2009-06-14 SPOP documented (antirez)
+2009-06-14 Clojure library (Ragnar Dahl&Atilde;&copy;n)
+2009-06-10 It is now possible to specify - as config file name to read it from stdin (antirez)
+2009-06-10 max bytes in an inline command raised to 1024*1024 bytes, in order to allow for very large MGETs and still protect from client crashes (antirez)
+2009-06-08 SPOP implemented. Hash table resizing for Sets and Expires too. Changed the resize policy to play better with RANDOMKEY and SPOP. (antirez)
+2009-06-07 some minor changes to the backtrace code (antirez)
+2009-06-07 enable backtrace capabilities only for Linux and MacOSX (antirez)
+2009-06-07 Dump a backtrace on sigsegv/sigbus, original coded (Diego Rosario Brogna)
+2009-06-05 Avoid a busy loop while sending very large replies against very fast links, this allows to be more responsive with other clients even under a KEY * against the loopback interface (antirez)
+2009-06-05 Kill the background saving process before performing SHUTDOWN to avoid races (antirez)
+2009-06-05 LREM now returns :0 for non existing keys (antirez)
+2009-06-05 added config.h for #ifdef business isolation, added fstat64 for Mac OS X (antirez)
+2009-06-04 macosx specific zmalloc.c, uses malloc_size function in order to avoid to waste memory and time to put an additional header (antirez)
+2009-06-04 DEBUG OBJECT implemented (antirez)
+2009-06-03 shareobjectspoolsize implemented in reds.conf, in order to control the pool size when object sharing is on (antirez)
+2009-05-27 maxmemory implemented (antirez)
+</pre>
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/RenameCommand.html b/doc/RenameCommand.html
new file mode 100644
index 000000000..40e85ba26
--- /dev/null
+++ b/doc/RenameCommand.html
@@ -0,0 +1,39 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>RenameCommand: Contents</b><br>&nbsp;&nbsp;<a href="#RENAME _oldkey_ _newkey_">RENAME _oldkey_ _newkey_</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Return value">Return value</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#See also">See also</a>
+ </div>
+
+ <h1 class="wikiname">RenameCommand</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+ <h1><a name="RENAME _oldkey_ _newkey_">RENAME _oldkey_ _newkey_</a></h1>
+<i>Time complexity: O(1)</i><blockquote>Atomically renames the key <i>oldkey</i> to <i>newkey</i>. If the source anddestination name are the same an error is returned. If <i>newkey</i>already exists it is overwritten.</blockquote>
+<h2><a name="Return value">Return value</a></h2><a href="ReplyTypes.html">Status code repy</a><h2><a name="See also">See also</a></h2>
+<ul><li> <a href="RenamenxCommand.html">RENAMENX</a> if you don't want overwrite the destination key if it exists.</li></ul>
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/RenamenxCommand.html b/doc/RenamenxCommand.html
new file mode 100644
index 000000000..d2a742a42
--- /dev/null
+++ b/doc/RenamenxCommand.html
@@ -0,0 +1,42 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>RenamenxCommand: Contents</b><br>&nbsp;&nbsp;<a href="#RENAMENX _oldkey_ _newkey_">RENAMENX _oldkey_ _newkey_</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Return value">Return value</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#See also">See also</a>
+ </div>
+
+ <h1 class="wikiname">RenamenxCommand</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+ <h1><a name="RENAMENX _oldkey_ _newkey_">RENAMENX _oldkey_ _newkey_</a></h1>
+<i>Time complexity: O(1)</i><blockquote>Rename <i>oldkey</i> into <i>newkey</i> but fails if the destination key <i>newkey</i> already exists.</blockquote>
+<h2><a name="Return value">Return value</a></h2><a href="ReplyTypes.html">Integer reply</a>, specifically:<br/><br/><pre class="codeblock python" name="code">
+1 if the key was renamed
+0 if the target key already exist
+</pre><h2><a name="See also">See also</a></h2>
+<ul><li> <a href="RenameCommand.html">RENAME</a> is like RENAMENX but overwrite existing destionation key.</li></ul>
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/ReplicationHowto.html b/doc/ReplicationHowto.html
new file mode 100644
index 000000000..e3e23499b
--- /dev/null
+++ b/doc/ReplicationHowto.html
@@ -0,0 +1,41 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>ReplicationHowto: Contents</b><br>&nbsp;&nbsp;<a href="#Redis Replication Howto">Redis Replication Howto</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#General Information">General Information</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#How Redis replication works">How Redis replication works</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Configuration">Configuration</a>
+ </div>
+
+ <h1 class="wikiname">ReplicationHowto</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+ <h1><a name="Redis Replication Howto">Redis Replication Howto</a></h1><h2><a name="General Information">General Information</a></h2>Redis replication is a very simple to use and configure master-slave replication that allows slave Redis servers to be exact copies of master servers. The following are some very important facts about Redis replication:<br/><br/><ul><li> A master can have multiple slaves.</li><li> Slaves are able to accept other slaves connections, so instead to connect a number of slaves against the same master it is also possible to connect some of the slaves to other slaves in a graph-alike structure.</li><li> Redis replication is non-blocking on the master side, this means that the master will continue to serve queries while one or more slaves are performing the first synchronization. Instead replication is blocking on the slave side: while the slave is performing the first synchronization it can't reply to queries.</li><li> Replications can be used both for scalability, in order to have multiple slaves for read-only queries (for example heavy <a href="SortCommand.html">SORT</a> operations can be launched against slaves), or simply for data redundancy.</li><li> It is possible to use replication to avoid the saving process on the master side: just configure your master redis.conf in order to avoid saving at all (just comment al the &quot;save&quot; directives), then connect a slave configured to save from time to time.</li></ul>
+<h2><a name="How Redis replication works">How Redis replication works</a></h2>In order to start the replication, or after the connection closes in order resynchronize with the master, the client connects to the master and issues the SYNC command.<br/><br/>The master starts a background saving, and at the same time starts to collect all the new commands received that had the effect to modify the dataset. When the background saving completed the master starts the transfer of the database file to the slave, that saves it on disk, and then load it in memory. At this point the master starts to send all the accumulated commands, and all the new commands received from clients, that had the effect of a dataset modification.<br/><br/>You can try it yourself via telnet. Connect to the Redis port while the server is doing some work and issue the SYNC command. You'll see a bulk transfer and then every command received by the master will be re-issued in the telnet session.<br/><br/>Slaves are able to automatically reconnect when the master <code name="code" class="python">&lt;-&gt;</code> slave link goes down for some reason. If the master receives multiple concurrent slave synchronization requests it performs a single background saving in order to serve all them.<h2><a name="Configuration">Configuration</a></h2>To configure replication is trivial: just add the following line to the slave configuration file:
+<pre class="codeblock python" name="code">
+slaveof 192.168.1.1 6379
+</pre>
+Of course you need to replace 192.168.1.1 6379 with your master ip address (or hostname) and port.
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/ReplyTypes.html b/doc/ReplyTypes.html
new file mode 100644
index 000000000..9f60aecf5
--- /dev/null
+++ b/doc/ReplyTypes.html
@@ -0,0 +1,42 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>ReplyTypes: Contents</b><br>&nbsp;&nbsp;<a href="#Redis Reply Types">Redis Reply Types</a><br>&nbsp;&nbsp;<a href="#Status code reply">Status code reply</a><br>&nbsp;&nbsp;<a href="#Error reply">Error reply</a><br>&nbsp;&nbsp;<a href="#Integer reply">Integer reply</a><br>&nbsp;&nbsp;<a href="#Bulk reply">Bulk reply</a><br>&nbsp;&nbsp;<a href="#Multi bulk reply">Multi bulk reply</a>
+ </div>
+
+ <h1 class="wikiname">ReplyTypes</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+ <h1><a name="Redis Reply Types">Redis Reply Types</a></h1>Redis commands can reply to the client with four different kind of replies, you can find the protocol level specification of this replies in the <a href="ProtocolSpecification.html">Redis Protocol Specification</a>. This page is instead an higher level description of the four types of replies from the point of view of the final user.<h1><a name="Status code reply">Status code reply</a></h1>
+Status code replies are single line strings having the <b>+</b> character as first byte. The string to return to the client is simply verything that follows the first <b>+</b> character. For example the <a href="PingCommand.html">PING</a> command returns <b>+PONG</b>, that is the string &quot;PONG&quot;.<h1><a name="Error reply">Error reply</a></h1>
+This is like a status code reply but the first character is <b>-</b> instead of <b>+</b>. The client library should raise an error for error replies and stop the execution of the program if the exception is not trapped, showing the error message (everything following the first <b>-</b> character). An example of error is &quot;-Error no such key&quot; or &quot;-foobar&quot;. Note that error replies will not collide with negative integer replies since integer replies are prefixed with the <b>:</b> character.<h1><a name="Integer reply">Integer reply</a></h1>
+At protocol level integer replies are single line replies in form of a decimal singed number prefixed by a <b>:</b> character. For example <b>:10</b> is an integer reply. Redis commands returning <i>true</i> or <i>false</i> will use an integer reply with 0 or 1 as values where 0 is false and 1 is true.<br/><br/>Integer replies are usually passed by client libraries as integer values.<h1><a name="Bulk reply">Bulk reply</a></h1>
+A bulk reply is a binary-safe reply that is used to return a binary safe single string value (string is not limited to alphanumerical strings, it may contain binary data of any kind). Client libraries will usually return a string as return value of Redis commands returning bulk replies. There is a special bulk reply that signal that the element does not exist. When this happens the client library should return 'nil', 'false', or some other special element that can be distinguished by an empty string.<h1><a name="Multi bulk reply">Multi bulk reply</a></h1>
+While a bulk reply returns a single string value, multi bulk replies are used to return multiple values: lists, sets, and so on. Elements of a bulk reply can be missing. Client libraries should return 'nil' or 'false' in order to make this elements distinguishable from empty strings. Client libraries should return multi bulk replies that are about ordered elements like list ranges as lists, and bulk replies about sets as hashes or Sets if the implementation language has a Set type.
+
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/RoadMap.html b/doc/RoadMap.html
new file mode 100644
index 000000000..3100b199c
--- /dev/null
+++ b/doc/RoadMap.html
@@ -0,0 +1,38 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>RoadMap: Contents</b><br>&nbsp;&nbsp;<a href="#Road Map (ROUGH DRAFT)">Road Map (ROUGH DRAFT)</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#TODO">TODO</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#1.2">1.2</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#1.1">1.1</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#1.0">1.0</a>
+ </div>
+
+ <h1 class="wikiname">RoadMap</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+
+<h1><a name="Road Map (ROUGH DRAFT)">Road Map (ROUGH DRAFT)</a></h1>The up to date, raw Road Map for Redis is part of the source code, you can find it here: <a href="http://github.com/antirez/redis/raw/master/TODO" target="_blank">http://github.com/antirez/redis/raw/master/TODO</a><h2><a name="TODO">TODO</a></h2>Add this information:<br/><br/><a href="http://groups.google.com/group/redis-db/browse_thread/thread/95329fcbf7825169/70214fc6cfe01856?lnk=gst&q=roadmap#70214fc6cfe01856" target="_blank">http://groups.google.com/group/redis-db/browse_thread/thread/95329fcbf7825169/70214fc6cfe01856?lnk=gst&amp;q=roadmap#70214fc6cfe01856</a><h2><a name="1.2">1.2</a></h2> <br/><br/><ul><li> <a href="DataTypes.html">Hash data type</a>.</li></ul><blockquote></blockquote><h2><a name="1.1">1.1</a></h2><ul><li> <a href="DataTypes.html">Ordered Set (ZSET)</a></li><li> <a href="MultiBulkCommands.html">Multibulk Commands</a></li><li> In memory integer encoding of <a href="DataTypes.html">integers</a>. Memory saving of 20% or more with datasets using high number of integer IDs. </li><li> Enhanced <a href="ExpireCommand.html">EXPIRE</a> algorithm.</li></ul>
+<h2><a name="1.0">1.0</a></h2><ul><li> TODO: Add 1.0 Features. This is important for clarity in <a href="SupportedLanguages.html">SupportedLanguages</a> </li></ul>
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/RpoplpushCommand.html b/doc/RpoplpushCommand.html
new file mode 100644
index 000000000..8a54bc4fe
--- /dev/null
+++ b/doc/RpoplpushCommand.html
@@ -0,0 +1,44 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>RpoplpushCommand: Contents</b><br>&nbsp;&nbsp;<a href="#RPOPLPUSH _srckey_ _dstkey_ (Redis &gt;">RPOPLPUSH _srckey_ _dstkey_ (Redis &gt;</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Programming patterns: safe queues">Programming patterns: safe queues</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Programming patterns: server-side O(N) list traversal">Programming patterns: server-side O(N) list traversal</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Return value">Return value</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#See also">See also</a>
+ </div>
+
+ <h1 class="wikiname">RpoplpushCommand</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+ <h1><a name="RPOPLPUSH _srckey_ _dstkey_ (Redis &gt;">RPOPLPUSH _srckey_ _dstkey_ (Redis &gt;</a></h1> 1.1) =
+<i>Time complexity: O(1)</i><blockquote>Atomically return and remove the last (tail) element of the <i>srckey</i> list,and push the element as the first (head) element of the <i>dstkey</i> list. Forexample if the source list contains the elements &quot;a&quot;,&quot;b&quot;,&quot;c&quot; and thedestination list contains the elements &quot;foo&quot;,&quot;bar&quot; after an RPOPLPUSH commandthe content of the two lists will be &quot;a&quot;,&quot;b&quot; and &quot;c&quot;,&quot;foo&quot;,&quot;bar&quot;.</blockquote>
+<blockquote>If the <i>key</i> does not exist or the list is already empty the specialvalue 'nil' is returned. If the <i>srckey</i> and <i>dstkey</i> are the same theoperation is equivalent to removing the last element from the list and pusingit as first element of the list, so it's a &quot;list rotation&quot; command.</blockquote>
+<h2><a name="Programming patterns: safe queues">Programming patterns: safe queues</a></h2><blockquote>Redis lists are often used as queues in order to exchange messages betweendifferent programs. A program can add a message performing an <a href="RpushCommand.html">LPUSH</a> operationagainst a Redis list (we call this program a Producer), while another program(that we call Consumer) can process the messages performing an <a href="LpopCommand.html">RPOP</a> commandin order to start reading the messages from the oldest.</blockquote>
+<blockquote>Unfortunately if a Consumer crashes just after an <a href="LpopCommand.html">RPOP</a> operation the messagegets lost. RPOPLPUSH solves this problem since the returned message isadded to another &quot;backup&quot; list. The Consumer can later remove the messagefrom the backup list using the <a href="LremCommand.html">LREM</a> command when the message was correctlyprocessed.</blockquote>
+<blockquote>Another process, called Helper, can monitor the &quot;backup&quot; list to check fortimed out entries to repush against the main queue.</blockquote>
+<h2><a name="Programming patterns: server-side O(N) list traversal">Programming patterns: server-side O(N) list traversal</a></h2><blockquote>Using RPOPPUSH with the same source and destination key a process canvisit all the elements of an N-elements List in O(N) without to transferthe full list from the server to the client in a single <a href="LrangeCommand.html">LRANGE</a> operation.Note that a process can traverse the list even while other processesare actively RPUSHing against the list, and still no element will be skipped.</blockquote>
+<h2><a name="Return value">Return value</a></h2><a href="ReplyTypes.html">Bulk reply</a><h2><a name="See also">See also</a></h2>
+<ul><li> <a href="RpushCommand.html">RPUSH</a></li><li> <a href="RpushCommand.html">LPUSH</a></li><li> <a href="LlenCommand.html">LLEN</a></li><li> <a href="LrangeCommand.html">LRANGE</a></li><li> <a href="LtrimCommand.html">LTRIM</a></li><li> <a href="LindexCommand.html">LINDEX</a></li><li> <a href="LsetCommand.html">LSET</a></li><li> <a href="LremCommand.html">LREM</a></li><li> <a href="LpopCommand.html">LPOP</a></li><li> <a href="LpopCommand.html">RPOP</a></li><li> <a href="RpoplpushCommand.html">RPOPLPUSH</a></li></ul>
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/RpushCommand.html b/doc/RpushCommand.html
new file mode 100644
index 000000000..9964e612a
--- /dev/null
+++ b/doc/RpushCommand.html
@@ -0,0 +1,40 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>RpushCommand: Contents</b><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#RPUSH _key_ _string_">RPUSH _key_ _string_</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#LPUSH _key_ _string_">LPUSH _key_ _string_</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Return value">Return value</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#See also">See also</a>
+ </div>
+
+ <h1 class="wikiname">RpushCommand</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+ <h3><a name="RPUSH _key_ _string_">RPUSH _key_ _string_</a></h3>
+<h3><a name="LPUSH _key_ _string_">LPUSH _key_ _string_</a></h3>
+<i>Time complexity: O(1)</i><blockquote>Add the <i>string</i> value to the head (RPUSH) or tail (LPUSH) of the liststored at <i>key</i>. If the key does not exist an empty list is created just beforethe append operation. If the key exists but is not a List an erroris returned.</blockquote>
+<h2><a name="Return value">Return value</a></h2><a href="ReplyTypes.html">Status code reply</a><h2><a name="See also">See also</a></h2>
+<ul><li> <a href="RpushCommand.html">RPUSH</a></li><li> <a href="RpushCommand.html">LPUSH</a></li><li> <a href="LlenCommand.html">LLEN</a></li><li> <a href="LrangeCommand.html">LRANGE</a></li><li> <a href="LtrimCommand.html">LTRIM</a></li><li> <a href="LindexCommand.html">LINDEX</a></li><li> <a href="LsetCommand.html">LSET</a></li><li> <a href="LremCommand.html">LREM</a></li><li> <a href="LpopCommand.html">LPOP</a></li><li> <a href="LpopCommand.html">RPOP</a></li><li> <a href="RpoplpushCommand.html">RPOPLPUSH</a></li></ul>
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/SaddCommand.html b/doc/SaddCommand.html
new file mode 100644
index 000000000..3c50a7080
--- /dev/null
+++ b/doc/SaddCommand.html
@@ -0,0 +1,42 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>SaddCommand: Contents</b><br>&nbsp;&nbsp;<a href="#SADD _key_ _member_">SADD _key_ _member_</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Return value">Return value</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#See also">See also</a>
+ </div>
+
+ <h1 class="wikiname">SaddCommand</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+ <h1><a name="SADD _key_ _member_">SADD _key_ _member_</a></h1>
+<i>Time complexity O(1)</i><blockquote>Add the specified <i>member</i> to the set value stored at <i>key</i>. If <i>member</i>is already a member of the set no operation is performed. If <i>key</i>does not exist a new set with the specified <i>member</i> as sole member iscrated. If the key exists but does not hold a set value an error isreturned.</blockquote>
+<h2><a name="Return value">Return value</a></h2><a href="ReplyTypes.html">Integer reply</a>, specifically:<br/><br/><pre class="codeblock python" name="code">
+1 if the new element was added
+0 if the element was already a member of the set
+</pre><h2><a name="See also">See also</a></h2>
+<ul><li> <a href="SremCommand.html">SREM</a></li><li> <a href="SismemberCommand.html">SISMEMBER</a></li><li> <a href="ScardCommand.html">SCARD</a></li><li> <a href="SmembersCommand.html">SMEMBERS</a></li><li> <a href="SinterCommand.html">SINTER</a></li><li> <a href="SinterstoreCommand.html">SINTERSTORE</a></li><li> <a href="SmoveCommand.html">SMOVE</a></li></ul>
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/SaveCommand.html b/doc/SaveCommand.html
new file mode 100644
index 000000000..3c4c37145
--- /dev/null
+++ b/doc/SaveCommand.html
@@ -0,0 +1,39 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>SaveCommand: Contents</b><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#SAVE">SAVE</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Return value">Return value</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#See also">See also</a>
+ </div>
+
+ <h1 class="wikiname">SaveCommand</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+ <h3><a name="SAVE">SAVE</a></h3>
+<blockquote>Save the DB on disk. The server hangs while the saving is notcompleted, no connection is served in the meanwhile. An OK codeis returned when the DB was fully stored in disk.</blockquote>
+<h2><a name="Return value">Return value</a></h2><a href="ReplyTypes.html">Status code reply</a><h2><a name="See also">See also</a></h2>
+<ul><li> <a href="BgsaveCommand.html">BGSAVE</a></li><li> <a href="ShutdownCommand.html">SHUTDOWN</a></li></ul>
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/ScardCommand.html b/doc/ScardCommand.html
new file mode 100644
index 000000000..ac992fa37
--- /dev/null
+++ b/doc/ScardCommand.html
@@ -0,0 +1,41 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>ScardCommand: Contents</b><br>&nbsp;&nbsp;<a href="#SCARD _key_">SCARD _key_</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Return value">Return value</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#See also">See also</a>
+ </div>
+
+ <h1 class="wikiname">ScardCommand</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+ <h1><a name="SCARD _key_">SCARD _key_</a></h1>
+<i>Time complexity O(1)</i><blockquote>Return the set cardinality (number of elements). If the <i>key</i> does notexist 0 is returned, like for empty sets.</blockquote>
+<h2><a name="Return value">Return value</a></h2><a href="ReplyTypes.html">Integer reply</a>, specifically:<br/><br/><pre class="codeblock python" name="code">
+the cardinality (number of elements) of the set as an integer.
+</pre><h2><a name="See also">See also</a></h2>
+<ul><li> <a href="SaddCommand.html">SADD</a></li><li> <a href="SremCommand.html">SREM</a></li><li> <a href="SismemberCommand.html">SISMEMBER</a></li><li> <a href="ScardCommand.html">SCARD</a></li><li> <a href="SmembersCommand.html">SMEMBERS</a></li><li> <a href="SinterCommand.html">SINTER</a></li><li> <a href="SinterstoreCommand.html">SINTERSTORE</a></li><li> <a href="SmoveCommand.html">SMOVE</a></li></ul>
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/SdiffCommand.html b/doc/SdiffCommand.html
new file mode 100644
index 000000000..9aaa82209
--- /dev/null
+++ b/doc/SdiffCommand.html
@@ -0,0 +1,45 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>SdiffCommand: Contents</b><br>&nbsp;&nbsp;<a href="#SDIFF _key1_ _key2_ ... _keyN_">SDIFF _key1_ _key2_ ... _keyN_</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Return value">Return value</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#See also">See also</a>
+ </div>
+
+ <h1 class="wikiname">SdiffCommand</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+ <h1><a name="SDIFF _key1_ _key2_ ... _keyN_">SDIFF _key1_ _key2_ ... _keyN_</a></h1>
+<i>Time complexity O(N) with N being the total number of elements of all the sets</i><blockquote>Return the members of a set resulting from the difference between the firstset provided and all the successive sets. Example:</blockquote>
+<pre class="codeblock python" name="code">
+key1 = x,a,b,c
+key2 = c
+key3 = a,d
+SDIFF key1,key2,key3 =&gt; x,b
+</pre><blockquote>Non existing keys are considered like empty sets.</blockquote>
+<h2><a name="Return value">Return value</a></h2><a href="ReplyTypes.html">Multi bulk reply</a>, specifically the list of common elements.<h2><a name="See also">See also</a></h2>
+<ul><li> <a href="SdiffstoreCommand.html">SDIFFSTORE</a></li><li> <a href="SaddCommand.html">SADD</a></li><li> <a href="SremCommand.html">SREM</a></li><li> <a href="SismemberCommand.html">SISMEMBER</a></li><li> <a href="ScardCommand.html">SCARD</a></li><li> <a href="SmembersCommand.html">SMEMBERS</a></li><li> <a href="SinterstoreCommand.html">SINTERSTORE</a></li><li> <a href="SunionCommand.html">SUNION</a></li><li> <a href="SunionstoreCommand.html">SUNIONSTORE</a></li><li> <a href="SmoveCommand.html">SMOVE</a></li></ul>
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/SdiffstoreCommand.html b/doc/SdiffstoreCommand.html
new file mode 100644
index 000000000..818c7fdeb
--- /dev/null
+++ b/doc/SdiffstoreCommand.html
@@ -0,0 +1,39 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>SdiffstoreCommand: Contents</b><br>&nbsp;&nbsp;<a href="#SDIFFSTORE _dstkey_ _key1_ _key2_ ... _keyN_">SDIFFSTORE _dstkey_ _key1_ _key2_ ... _keyN_</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Return value">Return value</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#See also">See also</a>
+ </div>
+
+ <h1 class="wikiname">SdiffstoreCommand</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+ <h1><a name="SDIFFSTORE _dstkey_ _key1_ _key2_ ... _keyN_">SDIFFSTORE _dstkey_ _key1_ _key2_ ... _keyN_</a></h1>
+<i>Time complexity O(N) where N is the total number of elements in all the provided sets</i><blockquote>This commnad works exactly like SDIFF but instead of being returned the resulting set is sotred in <i>dstkey</i>.</blockquote>
+<h2><a name="Return value">Return value</a></h2><a href="ReplyTypes.html">Status code reply</a><h2><a name="See also">See also</a></h2>
+<ul><li> <a href="SdiffCommand.html">SDIFF</a></li><li> <a href="SremCommand.html">SREM</a></li><li> <a href="SismemberCommand.html">SISMEMBER</a></li><li> <a href="ScardCommand.html">SCARD</a></li><li> <a href="SmembersCommand.html">SMEMBERS</a></li><li> <a href="SinterCommand.html">SINTER</a></li><li> <a href="SinterstoreCommand.html">SINTERSTORE</a></li><li> <a href="SunionCommand.html">SUNION</a></li><li> <a href="SmoveCommand.html">SMOVE</a></li></ul>
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/SelectCommand.html b/doc/SelectCommand.html
new file mode 100644
index 000000000..11c4b0502
--- /dev/null
+++ b/doc/SelectCommand.html
@@ -0,0 +1,39 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>SelectCommand: Contents</b><br>&nbsp;&nbsp;<a href="#SELECT _index_">SELECT _index_</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Return value">Return value</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#See also">See also</a>
+ </div>
+
+ <h1 class="wikiname">SelectCommand</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+ <h1><a name="SELECT _index_">SELECT _index_</a></h1>
+<blockquote>Select the DB with having the specified zero-based numeric index.For default every new client connection is automatically selectedto DB 0.</blockquote>
+<h2><a name="Return value">Return value</a></h2><a href="ReplyTypes.html">Status code reply</a><h2><a name="See also">See also</a></h2>
+<ul><li> <a href="FlushdbCommand.html">FLUSHDB</a></li><li> <a href="MoveCommand.html">MOVE</a></li></ul>
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/SetCommand.html b/doc/SetCommand.html
new file mode 100644
index 000000000..63c51f460
--- /dev/null
+++ b/doc/SetCommand.html
@@ -0,0 +1,39 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>SetCommand: Contents</b><br>&nbsp;&nbsp;<a href="#SET _key_ _value_">SET _key_ _value_</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Return value">Return value</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#See also">See also</a>
+ </div>
+
+ <h1 class="wikiname">SetCommand</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+ <h1><a name="SET _key_ _value_">SET _key_ _value_</a></h1>
+<i>Time complexity: O(1)</i><blockquote>Set the string <i>value</i> as value of the <i>key</i>.The string can't be longer than 1073741824 bytes (1 GB).</blockquote>
+<h2><a name="Return value">Return value</a></h2><a href="ReplyTypes.html">Status code reply</a><h2><a name="See also">See also</a></h2>
+<ul><li> <a href="SetnxCommand.html">SETNX</a> is like SET but don't perform the operation if the target key already exists.</li></ul>
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/SetnxCommand.html b/doc/SetnxCommand.html
new file mode 100644
index 000000000..15a6c0e24
--- /dev/null
+++ b/doc/SetnxCommand.html
@@ -0,0 +1,42 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>SetnxCommand: Contents</b><br>&nbsp;&nbsp;<a href="#SETNX _key_ _value_">SETNX _key_ _value_</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Return value">Return value</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#See also">See also</a>
+ </div>
+
+ <h1 class="wikiname">SetnxCommand</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+ <h1><a name="SETNX _key_ _value_">SETNX _key_ _value_</a></h1>
+<i>Time complexity: O(1)</i><blockquote>SETNX works exactly like <a href="SetCommand.html">SET</a> with the only difference thatif the key already exists no operation is performed.SETNX actually means &quot;SET if Not eXists&quot;.</blockquote>
+<h2><a name="Return value">Return value</a></h2><a href="ReplyTypes.html">Integer reply</a>, specifically:<br/><br/><pre class="codeblock python" name="code">
+1 if the key was set
+0 if the key was not set
+</pre><h2><a name="See also">See also</a></h2>
+<ul><li> <a href="SetCommand.html">SET</a></li></ul>
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/ShutdownCommand.html b/doc/ShutdownCommand.html
new file mode 100644
index 000000000..ce77ae971
--- /dev/null
+++ b/doc/ShutdownCommand.html
@@ -0,0 +1,39 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>ShutdownCommand: Contents</b><br>&nbsp;&nbsp;<a href="#SHUTDOWN">SHUTDOWN</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Return value">Return value</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#See also">See also</a>
+ </div>
+
+ <h1 class="wikiname">ShutdownCommand</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+ <h1><a name="SHUTDOWN">SHUTDOWN</a></h1>
+<blockquote>Stop all the clients, save the DB, then quit the server. This commandsmakes sure that the DB is switched off without the lost of any data.This is not guaranteed if the client uses simply &quot;SAVE&quot; and then&quot;QUIT&quot; because other clients may alter the DB data between the twocommands.</blockquote>
+<h2><a name="Return value">Return value</a></h2><a href="ReplyTypes.html">Status code reply</a> on error. On success nothing is returned since the server quits and the connection is closed.<h2><a name="See also">See also</a></h2>
+<ul><li> <a href="SaveCommand.html">SAVE</a></li><li> <a href="BgsaveCommand.html">BGSAVE</a></li></ul>
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/SideBar.html b/doc/SideBar.html
new file mode 100644
index 000000000..f69a322f1
--- /dev/null
+++ b/doc/SideBar.html
@@ -0,0 +1,36 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>SideBar: Contents</b>
+ </div>
+
+ <h1 class="wikiname">SideBar</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+ DRAFT<br/><br/><ul><li> <a href="Features.html">Features</a></li><li> <a href="QuickStart.html">Quick Start</a></li><li> <a href="DataTypes.html">Data Types</a></li><li> <a href="SupportedLanguages.html">Supported Languages</a></li><li> <a href="ObjectHashMappers.html">Object Hash Mappers</a></li><li> <a href="ProgrammingExamples.html">Programming Examples</a></li><li> <a href="RoadMap.html">Road Map</a></li><li> <a href="Speed.html">Speed</a></li><li> <a href="FromSqlToDataStructures.html">FromSqlToDataStructures</a></li></ul><blockquote></blockquote>
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/SinterCommand.html b/doc/SinterCommand.html
new file mode 100644
index 000000000..7a8259b49
--- /dev/null
+++ b/doc/SinterCommand.html
@@ -0,0 +1,40 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>SinterCommand: Contents</b><br>&nbsp;&nbsp;<a href="#SINTER _key1_ _key2_ ... _keyN_">SINTER _key1_ _key2_ ... _keyN_</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Return value">Return value</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#See also">See also</a>
+ </div>
+
+ <h1 class="wikiname">SinterCommand</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+ <h1><a name="SINTER _key1_ _key2_ ... _keyN_">SINTER _key1_ _key2_ ... _keyN_</a></h1>
+<i>Time complexity O(N<b>M) worst case where N is the cardinality of the smallest set and M the number of sets_<br/><br/><blockquote>Return the members of a set resulting from the intersection of all thesets hold at the specified keys. Like in LRANGE the result is sent tothe client as a multi-bulk reply (see the protocol specification formore information). If just a single key is specified, then this commandproduces the same result as SMEMBERS. Actually SMEMBERS is just syntaxsugar for SINTERSECT.</blockquote>
+<blockquote>Non existing keys are considered like empty sets, so if one of the keys ismissing an empty set is returned (since the intersection with an emptyset always is an empty set).</blockquote>
+<h2><a name="Return value">Return value</a></h2><a href="ReplyTypes.html">Multi bulk reply</a>, specifically the list of common elements.<h2><a name="See also">See also</a></h2>
+<blockquote>* <a href="SaddCommand.html">SADD</a>* <a href="SremCommand.html">SREM</a>* <a href="SismemberCommand.html">SISMEMBER</a>* <a href="ScardCommand.html">SCARD</a>* <a href="SmembersCommand.html">SMEMBERS</a>* <a href="SinterstoreCommand.html">SINTERSTORE</a>* <a href="SunionCommand.html">SUNION</a>* <a href="SunionstoreCommand.html">SUNIONSTORE</a>* <a href="SmoveCommand.html">SMOVE</a></blockquote></b></i>
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/SinterstoreCommand.html b/doc/SinterstoreCommand.html
new file mode 100644
index 000000000..798e75194
--- /dev/null
+++ b/doc/SinterstoreCommand.html
@@ -0,0 +1,39 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>SinterstoreCommand: Contents</b><br>&nbsp;&nbsp;<a href="#SINTERSTORE _dstkey_ _key1_ _key2_ ... _keyN_">SINTERSTORE _dstkey_ _key1_ _key2_ ... _keyN_</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Return value">Return value</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#See also">See also</a>
+ </div>
+
+ <h1 class="wikiname">SinterstoreCommand</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+ <h1><a name="SINTERSTORE _dstkey_ _key1_ _key2_ ... _keyN_">SINTERSTORE _dstkey_ _key1_ _key2_ ... _keyN_</a></h1>
+<i>Time complexity O(N<b>M) worst case where N is the cardinality of the smallest set and M the number of sets_<br/><br/><blockquote>This commnad works exactly like SINTER but instead of being returned the resulting set is sotred as _dstkey_.</blockquote>
+<h2><a name="Return value">Return value</a></h2><a href="ReplyTypes.html">Status code reply</a><h2><a name="See also">See also</a></h2>
+<blockquote>* <a href="SaddCommand.html">SADD</a>* <a href="SremCommand.html">SREM</a>* <a href="SismemberCommand.html">SISMEMBER</a>* <a href="ScardCommand.html">SCARD</a>* <a href="SmembersCommand.html">SMEMBERS</a>* <a href="SinterCommand.html">SINTER</a>* <a href="SinterstoreCommand.html">SINTERSTORE</a>* <a href="SmoveCommand.html">SMOVE</a></blockquote></b></i>
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/SismemberCommand.html b/doc/SismemberCommand.html
new file mode 100644
index 000000000..fb900c470
--- /dev/null
+++ b/doc/SismemberCommand.html
@@ -0,0 +1,42 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>SismemberCommand: Contents</b><br>&nbsp;&nbsp;<a href="#SISMEMBER _key_ _member_">SISMEMBER _key_ _member_</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Return value">Return value</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#See also">See also</a>
+ </div>
+
+ <h1 class="wikiname">SismemberCommand</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+ <h1><a name="SISMEMBER _key_ _member_">SISMEMBER _key_ _member_</a></h1>
+<i>Time complexity O(1)</i><blockquote>Return 1 if <i>member</i> is a member of the set stored at <i>key</i>, otherwise0 is returned.</blockquote>
+<h2><a name="Return value">Return value</a></h2><a href="ReplyTypes.html">Integer reply</a>, specifically:<br/><br/><pre class="codeblock python" name="code">
+1 if the element is a member of the set
+0 if the element is not a member of the set OR if the key does not exist
+</pre><h2><a name="See also">See also</a></h2>
+<ul><li> <a href="SaddCommand.html">SADD</a></li><li> <a href="SremCommand.html">SREM</a></li><li> <a href="SismemberCommand.html">SISMEMBER</a></li><li> <a href="ScardCommand.html">SCARD</a></li><li> <a href="SmembersCommand.html">SMEMBERS</a></li><li> <a href="SinterCommand.html">SINTER</a></li><li> <a href="SinterstoreCommand.html">SINTERSTORE</a></li><li> <a href="SmoveCommand.html">SMOVE</a></li></ul>
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/SlaveofCommand.html b/doc/SlaveofCommand.html
new file mode 100644
index 000000000..bbfa84564
--- /dev/null
+++ b/doc/SlaveofCommand.html
@@ -0,0 +1,41 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>SlaveofCommand: Contents</b><br>&nbsp;&nbsp;<a href="#SLAVEOF _host_ _port_">SLAVEOF _host_ _port_</a><br>&nbsp;&nbsp;<a href="#SLAVEOF no one">SLAVEOF no one</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Return value">Return value</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#See also">See also</a>
+ </div>
+
+ <h1 class="wikiname">SlaveofCommand</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+ <h1><a name="SLAVEOF _host_ _port_">SLAVEOF _host_ _port_</a></h1>
+<h1><a name="SLAVEOF no one">SLAVEOF no one</a></h1><blockquote>The SLAVEOF command can change the replication settings of a slave on the fly.If a Redis server is arleady acting as slave, the command <code name="code" class="python">SLAVEOF NO ONE</code>will turn off the replicaiton turning the Redis server into a MASTER.In the proper form <code name="code" class="python">SLAVEOF hostname port</code> will make the server a slave of thespecific server listening at the specified hostname and port.</blockquote>
+<blockquote>If a server is already a slave of some master, <code name="code" class="python">SLAVEOF hostname port</code> willstop the replication against the old server and start the synchrnonizationagainst the new one discarding the old dataset.</blockquote>
+<blockquote>The form <code name="code" class="python">SLAVEOF no one</code> will stop replication turning the server into aMASTER but will not discard the replication. So if the old master stop workingit is possible to turn the slave into a master and set the application touse the new master in read/write. Later when the other Redis server will befixed it can be configured in order to work as slave.</blockquote>
+<h2><a name="Return value">Return value</a></h2><a href="ReplyTypes.html">Status code reply</a><h2><a name="See also">See also</a></h2>
+<ul><li> <a href="InfoCommand.html">INFO</a></li></ul>
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/SmembersCommand.html b/doc/SmembersCommand.html
new file mode 100644
index 000000000..ddee1947c
--- /dev/null
+++ b/doc/SmembersCommand.html
@@ -0,0 +1,39 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>SmembersCommand: Contents</b><br>&nbsp;&nbsp;<a href="#SMEMBERS _key_">SMEMBERS _key_</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Return value">Return value</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#See also">See also</a>
+ </div>
+
+ <h1 class="wikiname">SmembersCommand</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+ <h1><a name="SMEMBERS _key_">SMEMBERS _key_</a></h1>
+<i>Time complexity O(N)</i><blockquote>Return all the members (elements) of the set value stored at <i>key</i>. Thisis just syntax glue for <a href="SintersectCommand.html">SINTERSECT</a>.</blockquote>
+<h2><a name="Return value">Return value</a></h2><a href="ReplyTypes.html">Multi bulk reply</a><h2><a name="See also">See also</a></h2>
+<ul><li> <a href="SaddCommand.html">SADD</a></li><li> <a href="SremCommand.html">SREM</a></li><li> <a href="SismemberCommand.html">SISMEMBER</a></li><li> <a href="ScardCommand.html">SCARD</a></li><li> <a href="SmembersCommand.html">SMEMBERS</a></li><li> <a href="SinterCommand.html">SINTER</a></li><li> <a href="SinterstoreCommand.html">SINTERSTORE</a></li><li> <a href="SmoveCommand.html">SMOVE</a></li></ul>
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/SmoveCommand.html b/doc/SmoveCommand.html
new file mode 100644
index 000000000..5cbde97e5
--- /dev/null
+++ b/doc/SmoveCommand.html
@@ -0,0 +1,44 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>SmoveCommand: Contents</b><br>&nbsp;&nbsp;<a href="#SMOVE _srckey_ _dstkey_ _member_">SMOVE _srckey_ _dstkey_ _member_</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Return value">Return value</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#See also">See also</a>
+ </div>
+
+ <h1 class="wikiname">SmoveCommand</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+ <h1><a name="SMOVE _srckey_ _dstkey_ _member_">SMOVE _srckey_ _dstkey_ _member_</a></h1>
+<i>Time complexity O(1)</i><blockquote>Move the specifided <i>member</i> from the set at <i>srckey</i> to the set at <i>dstkey</i>.This operation is atomic, in every given moment the element will appear tobe in the source or destination set for accessing clients.</blockquote>
+<blockquote>If the source set does not exist or does not contain the specified elementno operation is performed and zero is returned, otherwise the element isremoved from the source set and added to the destination set. On successone is returned, even if the element was already present in the destinationset.</blockquote>
+<blockquote>An error is raised if the source or destination keys contain a non Set value.</blockquote>
+<h2><a name="Return value">Return value</a></h2><a href="ReplyTypes.html">Integer reply</a>, specifically:<br/><br/><pre class="codeblock python" name="code">
+1 if the element was moved
+0 if the element was not found on the first set and no operation was performed
+</pre><h2><a name="See also">See also</a></h2>
+<ul><li> <a href="SaddCommand.html">SADD</a></li><li> <a href="SremCommand.html">SREM</a></li><li> <a href="SismemberCommand.html">SISMEMBER</a></li><li> <a href="ScardCommand.html">SCARD</a></li><li> <a href="SmembersCommand.html">SMEMBERS</a></li><li> <a href="SinterCommand.html">SINTER</a></li><li> <a href="SinterstoreCommand.html">SINTERSTORE</a></li></ul>
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/SortCommand.html b/doc/SortCommand.html
new file mode 100644
index 000000000..66e409228
--- /dev/null
+++ b/doc/SortCommand.html
@@ -0,0 +1,63 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>SortCommand: Contents</b><br>&nbsp;&nbsp;<a href="#SORT _key_ BY _pattern_ LIMIT _start_ _end_ GET _pattern_ ASC|DESC ALPHA">SORT _key_ BY _pattern_ LIMIT _start_ _end_ GET _pattern_ ASC|DESC ALPHA</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Return value">Return value</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#See Also">See Also</a>
+ </div>
+
+ <h1 class="wikiname">SortCommand</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+ <h1><a name="SORT _key_ BY _pattern_ LIMIT _start_ _end_ GET _pattern_ ASC|DESC ALPHA">SORT _key_ BY _pattern_ LIMIT _start_ _end_ GET _pattern_ ASC|DESC ALPHA</a></h1>
+<blockquote>Sort the elements contained in the List or Set value at <i>key</i>. By defaultsorting is numeric with elements being compared as double precisionfloating point numbers. This is the simplest form of SORT.</blockquote>
+<pre class="codeblock python" name="code">
+SORT mylist
+</pre><blockquote>Assuming mylist contains a list of numbers, the return value will bethe list of numbers ordered from the smallest to the bigger number.In order to get the sorting in reverse order use DESC:</blockquote>
+<pre class="codeblock python python" name="code">
+SORT mylist DESC
+</pre><blockquote>ASC is also supported but it's the default so you don't really need it.If you want to sort lexicographically use ALPHA. Note that Redis isutf-8 aware assuming you set the right value for the LC_COLLATEenvironment variable.</blockquote>
+<blockquote>Sort is able to limit the number of results using the LIMIT option:</blockquote>
+<pre class="codeblock python python python" name="code">
+SORT mylist LIMIT 0 10
+</pre><blockquote>In the above example SORT will return only 10 elements, starting fromthe first one (star is zero-based). Almost all the sort options canbe mixed together. For example:</blockquote>
+<pre class="codeblock python python python python" name="code">
+SORT mylist LIMIT 0 10 ALPHA DESC
+</pre><blockquote>Will sort <i>mylist</i> lexicographically, in descending order, returning onlythe first 10 elements.</blockquote>
+<blockquote>Sometimes you want to sort elements using external keys as weights tocompare instead to compare the actual List or Set elements. For examplethe list <i>mylist</i> may contain the elements 1, 2, 3, 4, that are justthe unique IDs of objects stored at object_1, object_2, object_3and object_4, while the keys weight_1, weight_2, weight_3 and weight_4can contain weights we want to use to sort the list of objectsidentifiers. We can use the following command:</blockquote>
+<pre class="codeblock python python python python python" name="code">
+SORT mylist BY weight_*
+</pre><blockquote>the BY option takes a pattern (<code name="code" class="python">weight_*</code> in our example) that is usedin order to generate the key names of the weights used for sorting.Weight key names are obtained substituting the first occurrence of <code name="code" class="python">*</code>with the actual value of the elements on the list (1,2,3,4 in our example).</blockquote>
+<blockquote>Still our previous example will return just the sorted IDs. Often it isneeded to get the actual objects sorted (object_1, ..., object_4 in theexample). We can do it with the following command:</blockquote>
+<pre class="codeblock python python python python python python" name="code">
+SORT mylist BY weight_* GET object_*
+</pre><blockquote>Note that GET can be used multiple times in order to get more keys forevery element of the original List or Set sorted.</blockquote>
+<blockquote>Since Redis &gt;= 1.1 it's possible to also GET the list elements itselfusing the special # pattern:</blockquote>
+<pre class="codeblock python python python python python python python" name="code">
+SORT mylist BY weight_* GET object_* GET #
+</pre><h2><a name="Return value">Return value</a></h2><a href="ReplyTypes.html">Multi bulk reply</a>, specifically a list of sorted elements.<h2><a name="See Also">See Also</a></h2>
+<ul><li> <a href="SinterCommand.html">SINTER</a></li><li> <a href="SunionCommand.html">SUNION</a></li></ul>
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/Speed.html b/doc/Speed.html
new file mode 100644
index 000000000..47e77761f
--- /dev/null
+++ b/doc/Speed.html
@@ -0,0 +1,38 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>Speed: Contents</b><br>&nbsp;&nbsp;<a href="#Speed (ROUGH DRAFT)">Speed (ROUGH DRAFT)</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#TODO">TODO</a>
+ </div>
+
+ <h1 class="wikiname">Speed</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+
+<h1><a name="Speed (ROUGH DRAFT)">Speed (ROUGH DRAFT)</a></h1><h2><a name="TODO">TODO</a></h2><ul><li> Written in ANSI C</li><li> Pipelining</li><li> MultiBulkCommands</li><li> epoll &gt;= 1.1</li><li> Benchmarks</li></ul>
+Redis takes the whole dataset in memory and <a href="Persistence.html">writes asynchronously to disk</a> in order to be very fast, you have the best of both worlds: hyper-speed and <a href="Persistence.html">persistence</a> for your data.<br/><br/>Establishing a new connection to a Redis Server is <i>simple</i> and <i>fast</i> nothing more that a TCP three way handshake. There is no authentication or other handshake involved (<a href="http://groups.google.com/group/redis-db/browse_thread/thread/1adb93f0b6a1460a" target="_blank">Google Group: Can we use connection pool in Redis?</a>) You can read more about the way Redis clients communicate with servers in the <a href="ProtocolSpecification.html">Protocol Specification</a>.<br/><br/>On most commodity hardware it takes about 45 seconds to restore a 2 GB database, without fancy RAID. This can give you some kind of feeling about the order of magnitude of the time needed to load data when you restart the server, so restarting a server is fast too.<br/><br/>Also <a href="Replication.html">Replication</a> is fast, benchamarks will give you the the same order of magnitude a restart does (<a href="http://groups.google.com/group/redis-db/browse_thread/thread/3ab1c8b2126f1b8/29bdb6c5973f0388?lnk=gst&q=replication+#29bdb6c5973f0388" target="_blank">Google Group: Replication speed benchmak</a>)
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/SremCommand.html b/doc/SremCommand.html
new file mode 100644
index 000000000..b173f4d28
--- /dev/null
+++ b/doc/SremCommand.html
@@ -0,0 +1,42 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>SremCommand: Contents</b><br>&nbsp;&nbsp;<a href="#SREM _key_ _member_">SREM _key_ _member_</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Return value">Return value</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#See also">See also</a>
+ </div>
+
+ <h1 class="wikiname">SremCommand</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+ <h1><a name="SREM _key_ _member_">SREM _key_ _member_</a></h1>
+<i>Time complexity O(1)</i><blockquote>Remove the specified <i>member</i> from the set value stored at <i>key</i>. If_member_ was not a member of the set no operation is performed. If <i>key</i>does not hold a set value an error is returned.</blockquote>
+<h2><a name="Return value">Return value</a></h2><a href="ReplyTypes.html">Integer reply</a>, specifically:<br/><br/><pre class="codeblock python" name="code">
+1 if the new element was removed
+0 if the new element was not a member of the set
+</pre><h2><a name="See also">See also</a></h2>
+<ul><li> <a href="SaddCommand.html">SADD</a></li><li> <a href="SismemberCommand.html">SISMEMBER</a></li><li> <a href="ScardCommand.html">SCARD</a></li><li> <a href="SmembersCommand.html">SMEMBERS</a></li><li> <a href="SinterCommand.html">SINTER</a></li><li> <a href="SinterstoreCommand.html">SINTERSTORE</a></li><li> <a href="SmoveCommand.html">SMOVE</a></li></ul>
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/SunionCommand.html b/doc/SunionCommand.html
new file mode 100644
index 000000000..0c4ee4af8
--- /dev/null
+++ b/doc/SunionCommand.html
@@ -0,0 +1,40 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>SunionCommand: Contents</b><br>&nbsp;&nbsp;<a href="#SUNION _key1_ _key2_ ... _keyN_">SUNION _key1_ _key2_ ... _keyN_</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Return value">Return value</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#See also">See also</a>
+ </div>
+
+ <h1 class="wikiname">SunionCommand</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+ <h1><a name="SUNION _key1_ _key2_ ... _keyN_">SUNION _key1_ _key2_ ... _keyN_</a></h1>
+<i>Time complexity O(N) where N is the total number of elements in all the provided sets</i><blockquote>Return the members of a set resulting from the union of all thesets hold at the specified keys. Like in LRANGE the result is sent tothe client as a multi-bulk reply (see the protocol specification formore information). If just a single key is specified, then this commandproduces the same result as <a href="SmembersCommand.html">SMEMBERS</a>.</blockquote>
+<blockquote>Non existing keys are considered like empty sets.</blockquote>
+<h2><a name="Return value">Return value</a></h2><a href="ReplyTypes.html">Multi bulk reply</a>, specifically the list of common elements.<h2><a name="See also">See also</a></h2>
+<ul><li> <a href="SremCommand.html">SREM</a></li><li> <a href="SismemberCommand.html">SISMEMBER</a></li><li> <a href="ScardCommand.html">SCARD</a></li><li> <a href="SmembersCommand.html">SMEMBERS</a></li><li> <a href="SinterCommand.html">SINTER</a></li><li> <a href="SinterstoreCommand.html">SINTERSTORE</a></li><li> <a href="SunionstoreCommand.html">SUNIONSTORE</a></li><li> <a href="SmoveCommand.html">SMOVE</a></li></ul>
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/SunionstoreCommand.html b/doc/SunionstoreCommand.html
new file mode 100644
index 000000000..ea1052a62
--- /dev/null
+++ b/doc/SunionstoreCommand.html
@@ -0,0 +1,39 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>SunionstoreCommand: Contents</b><br>&nbsp;&nbsp;<a href="#SUNIONSTORE _dstkey_ _key1_ _key2_ ... _keyN_">SUNIONSTORE _dstkey_ _key1_ _key2_ ... _keyN_</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Return value">Return value</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#See also">See also</a>
+ </div>
+
+ <h1 class="wikiname">SunionstoreCommand</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+ <h1><a name="SUNIONSTORE _dstkey_ _key1_ _key2_ ... _keyN_">SUNIONSTORE _dstkey_ _key1_ _key2_ ... _keyN_</a></h1>
+<i>Time complexity O(N) where N is the total number of elements in all the provided sets</i><blockquote>This commnad works exactly like SUNION but instead of being returned the resulting set is sotred as <i>dstkey</i>.</blockquote>
+<h2><a name="Return value">Return value</a></h2><a href="ReplyTypes.html">Status code reply</a><h2><a name="See also">See also</a></h2>
+<ul><li> <a href="SremCommand.html">SREM</a></li><li> <a href="SismemberCommand.html">SISMEMBER</a></li><li> <a href="ScardCommand.html">SCARD</a></li><li> <a href="SmembersCommand.html">SMEMBERS</a></li><li> <a href="SinterCommand.html">SINTER</a></li><li> <a href="SinterstoreCommand.html">SINTERSTORE</a></li><li> <a href="SunionCommand.html">SUNION</a></li><li> <a href="SmoveCommand.html">SMOVE</a></li></ul>
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/SupportedLanguages.html b/doc/SupportedLanguages.html
new file mode 100644
index 000000000..3b8156a2d
--- /dev/null
+++ b/doc/SupportedLanguages.html
@@ -0,0 +1,59 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>SupportedLanguages: Contents</b><br>&nbsp;&nbsp;<a href="#Supported Languages (DRAFT)">Supported Languages (DRAFT)</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#TODO">TODO</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Features Support Matrix">Features Support Matrix</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Version 1.1">Version 1.1</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Version 1.0">Version 1.0</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Client Libraries Reference">Client Libraries Reference</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#as3 (ActionScript 3)">as3 (ActionScript 3)</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#redis-clojure (Clojure)">redis-clojure (Clojure)</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#CL-Redis (Common Lisp)">CL-Redis (Common Lisp)</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#erldis (Erlang)">erldis (Erlang)</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Go-Redis (Go)">Go-Redis (Go)</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#haskell-redis (Haskell)">haskell-redis (Haskell)</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Java">Java</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#redis-lua (Lua)">redis-lua (Lua)</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Perl">Perl</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#PHP">PHP</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Python">Python</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#txredis">txredis</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#redis-rb (Ruby)">redis-rb (Ruby)</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#scala-redis (Scala)">scala-redis (Scala)</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Tcl">Tcl</a>
+ </div>
+
+ <h1 class="wikiname">SupportedLanguages</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+ <h1><a name="Supported Languages (DRAFT)">Supported Languages (DRAFT)</a></h1>Wondering if you can use Redis from your favorite language? Well here is the definitive guide to the available client libraries.<br/><br/>This libraries are intended to expose Redis commands, but you also have the option to use some higher level libraries that provide a <b><a href="ObjectHashMappers.html">Object Hash Mappings</a></b> pretty much the same idea implemented by a classic <b>ORM</b>.<h2><a name="TODO">TODO</a></h2><ul><li> Add <a href="http://github.com/madsimian/em-redis" target="_blank">http://github.com/madsimian/em-redis</a></li><li> Add <a href="http://github.com/besquared/redis-datastructures" target="_blank">http://github.com/besquared/redis-datastructures</a></li><li> Add <a href="http://github.com/sma/redis-node-client" target="_blank">http://github.com/sma/redis-node-client</a></li></ul>
+<h2><a name="Features Support Matrix">Features Support Matrix</a></h2> <br/><br/>The following matrix should give you a quick overviwe of the state of the different client libraries existing for each supported language.<br/><br/>The core command set is the one of Version 1.0, while <a href="Sharding.html">Sharding</a> and <a href="Pipelining.html">Pipelining</a> are convenient client side features not tied to any Redis server version.<h3><a name="Version 1.1">Version 1.1</a></h3>Compatible client libraries are expected to implement the command sets specified in <b>Version 1.0</b> plus:<br/><br/><ul><li> <b>String</b>: MSET, MSETNX.</li><li> <b>List</b>: RPOPLPUSH.</li><li> <b>Sorted Set (ZSET)</b>: ZADD, ZREM, ZRANGE, ZREVRANGE, ZRANGEBYSCORE, ZCARD, ZSCORE.</li></ul>
+<h3><a name="Version 1.0">Version 1.0</a></h3> <br/><br/>Compatible client libraries are expected to implement the following command sets:<br/><br/><ul><li> <b>String</b>: GET, SET, SETNX, DEL, EXISTS, INCR, DECR, MGET, INCRBY, DECRBY, GETSET, TYPE.</li><li> <b>List</b>: RPUSH, LPUSH, RPOP, LPOP, LLEN, LINDEX, LSET, LRANGE, LTRIM, LREM.</li><li> <b>Set</b>: SADD, SREM, SMOVE, SISMEMBER, SCARD, SPOP, SINTER, SINTERSTORE, SUNION, SUNIONSTORE, SDIFF, SDIFFSTORE, SMEMBERS.</li><li> <b>Keyspace</b>: KEYS, RANDOMKEY, RENAME, RENAMENX, DBSIZE, EXPIRE, TTL.</li><li> <b>Databases</b>: SELECT, MOVE, FLUSHDB, FLUSHALL.</li><li> <b>Sort</b>: SORT</li><li> <b>Connection</b>: AUTH, QUIT?. ???</li><li> <b>Persistence</b>: SAVE, BGSAVE, LASTSAVE, SHUTDOWN?. ???</li><li> <b>Server</b>: INFO, MONITOR? SLAVEOF? ???</li></ul><blockquote></blockquote><table><tr><td style="border: 1px solid #aaa; padding: 5px;"> <b>Language</b> </td><td style="border: 1px solid #aaa; padding: 5px;"> <b>Name</b> </td><td style="border: 1px solid #aaa; padding: 5px;"> <b>Sharding</b> </td><td style="border: 1px solid #aaa; padding: 5px;"> <b>Pipelining</b> </td><td style="border: 1px solid #aaa; padding: 5px;"> <b>1.1</b> </td><td style="border: 1px solid #aaa; padding: 5px;"> <b>1.0</b> </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> ActionScript 3</td><td style="border: 1px solid #aaa; padding: 5px;"> as3redis </td><td style="border: 1px solid #aaa; padding: 5px;"> No </td><td style="border: 1px solid #aaa; padding: 5px;"> Yes </td><td style="border: 1px solid #aaa; padding: 5px;"> Yes </td><td style="border: 1px solid #aaa; padding: 5px;"> Yes </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> Clojure </td><td style="border: 1px solid #aaa; padding: 5px;"> redis-clojure </td><td style="border: 1px solid #aaa; padding: 5px;"> No </td><td style="border: 1px solid #aaa; padding: 5px;"> No </td><td style="border: 1px solid #aaa; padding: 5px;"> Partial </td><td style="border: 1px solid #aaa; padding: 5px;"> Yes </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> Common Lisp </td><td style="border: 1px solid #aaa; padding: 5px;"> CL-Redis </td><td style="border: 1px solid #aaa; padding: 5px;"> No </td><td style="border: 1px solid #aaa; padding: 5px;"> No </td><td style="border: 1px solid #aaa; padding: 5px;"> No </td><td style="border: 1px solid #aaa; padding: 5px;"> Yes </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> Erlang </td><td style="border: 1px solid #aaa; padding: 5px;"> erldis </td><td style="border: 1px solid #aaa; padding: 5px;"> No </td><td style="border: 1px solid #aaa; padding: 5px;"> Looks like </td><td style="border: 1px solid #aaa; padding: 5px;"> No </td><td style="border: 1px solid #aaa; padding: 5px;"> Looks like </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> Go </td><td style="border: 1px solid #aaa; padding: 5px;"> Go-Redis </td><td style="border: 1px solid #aaa; padding: 5px;"> No </td><td style="border: 1px solid #aaa; padding: 5px;"> Yes </td><td style="border: 1px solid #aaa; padding: 5px;"> Yes </td><td style="border: 1px solid #aaa; padding: 5px;"> Yes </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> Haskell </td><td style="border: 1px solid #aaa; padding: 5px;"> haskell-redis </td><td style="border: 1px solid #aaa; padding: 5px;"> No </td><td style="border: 1px solid #aaa; padding: 5px;"> No </td><td style="border: 1px solid #aaa; padding: 5px;"> No </td><td style="border: 1px solid #aaa; padding: 5px;"> Yes </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> Java </td><td style="border: 1px solid #aaa; padding: 5px;"> JDBC-Redis </td><td style="border: 1px solid #aaa; padding: 5px;"> No </td><td style="border: 1px solid #aaa; padding: 5px;"> No </td><td style="border: 1px solid #aaa; padding: 5px;"> No </td><td style="border: 1px solid #aaa; padding: 5px;"> Yes </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> Java </td><td style="border: 1px solid #aaa; padding: 5px;"> JRedis </td><td style="border: 1px solid #aaa; padding: 5px;"> No </td><td style="border: 1px solid #aaa; padding: 5px;"> Yes </td><td style="border: 1px solid #aaa; padding: 5px;"> Yes </td><td style="border: 1px solid #aaa; padding: 5px;"> Yes </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> LUA </td><td style="border: 1px solid #aaa; padding: 5px;"> redis-lua </td><td style="border: 1px solid #aaa; padding: 5px;"> No </td><td style="border: 1px solid #aaa; padding: 5px;"> No </td><td style="border: 1px solid #aaa; padding: 5px;"> Yes </td><td style="border: 1px solid #aaa; padding: 5px;"> Yes </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> Perl </td><td style="border: 1px solid #aaa; padding: 5px;"> Redis Client </td><td style="border: 1px solid #aaa; padding: 5px;"> No </td><td style="border: 1px solid #aaa; padding: 5px;"> No </td><td style="border: 1px solid #aaa; padding: 5px;"> No </td><td style="border: 1px solid #aaa; padding: 5px;"> Yes </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> Perl </td><td style="border: 1px solid #aaa; padding: 5px;"> AnyEvent::Redis </td><td style="border: 1px solid #aaa; padding: 5px;"> No </td><td style="border: 1px solid #aaa; padding: 5px;"> No </td><td style="border: 1px solid #aaa; padding: 5px;"> No </td><td style="border: 1px solid #aaa; padding: 5px;"> Yes </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> PHP </td><td style="border: 1px solid #aaa; padding: 5px;"> Redis PHP Bindings </td><td style="border: 1px solid #aaa; padding: 5px;"> No </td><td style="border: 1px solid #aaa; padding: 5px;"> No </td><td style="border: 1px solid #aaa; padding: 5px;"> No </td><td style="border: 1px solid #aaa; padding: 5px;"> Yes </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> PHP </td><td style="border: 1px solid #aaa; padding: 5px;"> phpredis (C) </td><td style="border: 1px solid #aaa; padding: 5px;"> No </td><td style="border: 1px solid #aaa; padding: 5px;"> No </td><td style="border: 1px solid #aaa; padding: 5px;"> No </td><td style="border: 1px solid #aaa; padding: 5px;"> Yes </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> PHP </td><td style="border: 1px solid #aaa; padding: 5px;"> Predis </td><td style="border: 1px solid #aaa; padding: 5px;"> Yes </td><td style="border: 1px solid #aaa; padding: 5px;"> Yes </td><td style="border: 1px solid #aaa; padding: 5px;"> Yes </td><td style="border: 1px solid #aaa; padding: 5px;"> Yes </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> PHP </td><td style="border: 1px solid #aaa; padding: 5px;"> Redisent </td><td style="border: 1px solid #aaa; padding: 5px;"> Yes </td><td style="border: 1px solid #aaa; padding: 5px;"> No </td><td style="border: 1px solid #aaa; padding: 5px;"> No </td><td style="border: 1px solid #aaa; padding: 5px;"> Yes </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> Python </td><td style="border: 1px solid #aaa; padding: 5px;"> Python Client </td><td style="border: 1px solid #aaa; padding: 5px;"> No </td><td style="border: 1px solid #aaa; padding: 5px;"> No </td><td style="border: 1px solid #aaa; padding: 5px;"> No </td><td style="border: 1px solid #aaa; padding: 5px;"> Yes </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> Python </td><td style="border: 1px solid #aaa; padding: 5px;"> py-redis </td><td style="border: 1px solid #aaa; padding: 5px;"> No </td><td style="border: 1px solid #aaa; padding: 5px;"> No </td><td style="border: 1px solid #aaa; padding: 5px;"> Partial </td><td style="border: 1px solid #aaa; padding: 5px;"> Yes </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> Python </td><td style="border: 1px solid #aaa; padding: 5px;"> txredis </td><td style="border: 1px solid #aaa; padding: 5px;"> No </td><td style="border: 1px solid #aaa; padding: 5px;"> No </td><td style="border: 1px solid #aaa; padding: 5px;"> No </td><td style="border: 1px solid #aaa; padding: 5px;"> Yes </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> Ruby </td><td style="border: 1px solid #aaa; padding: 5px;"> redis-rb </td><td style="border: 1px solid #aaa; padding: 5px;"> Yes </td><td style="border: 1px solid #aaa; padding: 5px;"> Yes </td><td style="border: 1px solid #aaa; padding: 5px;"> Yes </td><td style="border: 1px solid #aaa; padding: 5px;"> Yes </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> Scala </td><td style="border: 1px solid #aaa; padding: 5px;"> scala-redis </td><td style="border: 1px solid #aaa; padding: 5px;"> Yes </td><td style="border: 1px solid #aaa; padding: 5px;"> No </td><td style="border: 1px solid #aaa; padding: 5px;"> No </td><td style="border: 1px solid #aaa; padding: 5px;"> Yes </td></tr><tr><td style="border: 1px solid #aaa; padding: 5px;"> TCL </td><td style="border: 1px solid #aaa; padding: 5px;"> TCL </td><td style="border: 1px solid #aaa; padding: 5px;"> No </td><td style="border: 1px solid #aaa; padding: 5px;"> No </td><td style="border: 1px solid #aaa; padding: 5px;"> Yes </td><td style="border: 1px solid #aaa; padding: 5px;"> Yes </td></tr></table>
+<h2><a name="Client Libraries Reference">Client Libraries Reference</a></h2><h3><a name="as3 (ActionScript 3)">as3 (ActionScript 3)</a></h3><ul><li> An ActionScript 3 (Flash) library for Redis.</li><li> Repository: <a href="http://github.com/claus/as3redis" target="_blank">http://github.com/claus/as3redis</a></li><li> Author: Claus Wahlers, <a href="http://twitter.com/cwahlers" target="_blank"> @cwahlers</a>.</li></ul>
+<h3><a name="redis-clojure (Clojure)">redis-clojure (Clojure)</a></h3><ul><li> A Clojure client library for the key-value storage system Redis.</li><li> Repository: <a href="http://github.com/ragnard/redis-clojure" target="_blank">http://github.com/ragnard/redis-clojure</a></li><li> Author: Ragnar Dahl&Atilde;&copy;n, <a href="http://twitter.com/ragge" target="_blank">@ragge</a>.</li></ul>
+<h3><a name="CL-Redis (Common Lisp)">CL-Redis (Common Lisp)</a></h3><ul><li> Common Lisp client library for Redis, an advanced key/value store.</li><li> Home Page: <a href="http://www.cliki.net/cl-redis" target="_blank">http://www.cliki.net/cl-redis</a></li><li> Author: Mahmud, <a href="http://twitter.com/BigThingist" target="_blank">@BigThingist</a>.</li></ul>
+<h3><a name="erldis (Erlang)">erldis (Erlang)</a></h3><ul><li> Client protocol for redis key-value store.</li><li> Author: <a href="http://www.adroll.com/" target="_blank">Valentino Volonghi</a>, <a href="http://twitter.com/dialtone_" target="_blank">@dialtone_</a>.</li><li> Repository: <a href="http://bitbucket.org/adroll/erldis/" target="_blank">http://bitbucket.org/adroll/erldis/</a></li></ul>
+<h3><a name="Go-Redis (Go)">Go-Redis (Go)</a></h3><ul><li> Client protocol for redis key-value store.</li><li> Author: Joubin Houshyar, <a href="http://twitter.com/SunOf27" target="_blank">@SunOf27</a>.</li><li> Repository: <a href="http://github.com/alphazero/Go-Redis" target="_blank">http://github.com/alphazero/Go-Redis</a></li></ul>
+<h3><a name="haskell-redis (Haskell)">haskell-redis (Haskell)</a></h3><ul><li> A Haskell binding for the Redis database.</li><li> Author: <a href="http://obvioushints.blogspot.com/" target="_blank">Alvaro Videla</a>, <a href="http://twitter.com/old_sound" target="_blank">@old_sound</a>.</li><li> Repository: <a href="http://bitbucket.org/videlalvaro/redis-haskell/wiki/Home" target="_blank"> </a></li></ul>
+<h3><a name="Java">Java</a></h3><h4><a name="JDBC-Redis">JDBC-Redis</a></h4><ul><li> JDBC-Redis is Java driver using the JDBC interface for Redis Database. This project doesn't aim for a complete implementation of the JDBC specification since Redis isn't a relational database, but should provide a familiar interface to Java developers interact with Redis.</li><li> Repository: <a href="http://code.google.com/p/jdbc-redis/" target="_blank">http://code.google.com/p/jdbc-redis/</a></li></ul>
+<h4><a name="JRedis">JRedis</a></h4><ul><li> Java Client and Connectors for Redis JCA compliant. Currently offers a complete functioning Synchronous connector, Asynchronous connection and pipelining support under heavy develpment.</li><li> Author: Joubin Houshyar, <a href="http://twitter.com/SunOf27" target="_blank">@SunOf27</a>.</li><li> Home: <a href="http://code.google.com/p/jredis/" target="_blank">http://code.google.com/p/jredis/</a></li><li> Repository: <a href="http://github.com/alphazero/jredis" target="_blank">http://github.com/alphazero/jredis</a></li></ul>
+<h3><a name="redis-lua (Lua)">redis-lua (Lua)</a></h3><ul><li> A Lua client library for the redis key value storage system.</li><li> Author: <a href="http://www.clorophilla.net/blog/" target="_blank">Daniele Alessandri</a>, <a href="http://twitter.com/jol1hahn" target="_blank">@jol1hahn</a>.</li><li> Repository: <a href="http://github.com/nrk/redis-lua" target="_blank">http://github.com/nrk/redis-lua</a></li></ul>
+<h3><a name="Perl">Perl</a></h3><h4><a name="Perl Client">Perl Client</a></h4><ul><li> Perl binding for Redis database.</li><li> Author: <a href="http://blog.rot13.org/" target="_blank">Dobrica Pavlinusic</a>, <a href="http://twitter.com/dpavlin" target="_blank">@dpavlin</a>.</li><li> Repository: <a href="http://svn.rot13.org/index.cgi/Redis" target="_blank">http://svn.rot13.org/index.cgi/Redis</a></li></ul>
+<h4><a name="AnyEvent::Redis">AnyEvent::Redis</a></h4><ul><li> Non-blocking Redis client.</li><li> Author: <a href="http://bulknews.typepad.com/" target="_blank">Tatsuhiko Miyagawa</a>, <a href="http://twitter.com/miyagawa" target="_blank">@miyagawa</a>.</li><li> Repository: <a href="http://github.com/miyagawa/AnyEvent-Redis/" target="_blank">http://github.com/miyagawa/AnyEvent-Redis/</a></li></ul>
+<h3><a name="PHP">PHP</a></h3><h4><a name="Redis PHP Bindings">Redis PHP Bindings</a></h4><ul><li> Simple default binding in Redis main repository. No longer under active development.</li><li> Author: <a href="http://qix.it/" target="_blank">Ludovico Magnocavallo</a>, <a href="http://twitter.com/ludo" target="_blank">@ludo</a>.</li><li> Repository: <a href="http://code.google.com/p/redis/source/browse/#svn/trunk/client-libraries/php" target="_blank">http://code.google.com/p/redis/source/browse/#svn/trunk/client-libraries/php</a></li></ul>
+<h4><a name="phpredis">phpredis</a></h4><ul><li> This extension provides an API for communicating with Redis database, a persistent key-value database with built-in net interface written in ANSI-C for Posix systems.</li><li> Author: <a href="http://www.alfonsojimenez.com/" target="_blank">Alfonso Jimenez</a> , (<a href="http://twitter.com/alfonsojimenez" target="_blank">@alfonsojimenez</a>), Nicolas Favre-F&Atilde;&copy;lix and Nasreddine Bouafif.</li><li> Repository: <a href="http://github.com/owlient/phpredis" target="_blank">http://github.com/owlient/phpredis</a></li></ul>
+<h4><a name="Predis">Predis</a></h4><ul><li> A flexible and feature-complete PHP client library for the Redis key-value database. Predis is currently a work-in-progress and it targets PHP &gt;= 5.3, though it is highly due to be backported to PHP &gt;= 5.2.6 as soon as the public API and the internal design on the main branch will be considered stable enough.</li><li> Author: <a href="http://www.clorophilla.net/blog/" target="_blank">Daniele Alessandri</a>, <a href="http://twitter.com/jol1hahn" target="_blank">@jol1hahn</a></li><li> Repository: <a href="http://github.com/nrk/predis/" target="_blank">http://github.com/nrk/predis/</a></li></ul>
+<h4><a name="Redisent">Redisent</a></h4><ul><li> Redisent is a simple, no-nonsense interface to the Redis key-value store for modest developers. Due to the way it is implemented, it is flexible and tolerant of changes to the Redis protocol.</li><li> Author: <a href="http://blog.justinpoliey.com/" target="_blank">Justin Poliey</a>, <a href="http://twitter.com/justinpoliey" target="_blank">@justinpoliey</a></li><li> Repository: <a href="http://github.com/jdp/redisent" target="_blank">http://github.com/jdp/redisent</a></li></ul>
+<h3><a name="Python">Python</a></h3><h4><a name="Python Client">Python Client</a></h4><ul><li> Simple Python client in Redis main repository. No longer under active development.</li><li> Author: <a href="http://qix.it/" target="_blank">Ludovico Magnocavallo</a>, <a href="http://twitter.com/ludo" target="_blank">@ludo</a>.</li><li> Repository: <a href="http://code.google.com/p/redis/source/browse/#svn/trunk/client-libraries/python" target="_blank">http://code.google.com/p/redis/source/browse/#svn/trunk/client-libraries/python</a></li></ul>
+<h4><a name="py-redis">py-redis</a></h4><ul><li> Redis Python Client.</li><li> Author: <a href="Andy.html">McCurdy</a>, <a href="http://twitter.com/andymccurdy" target="_blank">@andymccurdy</a>.</li><li> Repository: <a href="http://github.com/andymccurdy/redis-py" target="_blank">http://github.com/andymccurdy/redis-py</a></li></ul>
+<h3><a name="txredis">txredis</a></h3><ul><li> Python/Twisted client for Redis key-value store</li><li> Author: Dorian Raymer, <a href="http://twitter.com/dio_rian" target="_blank">@dio_rian</a>.</li><li> PyPI: <a href="http://pypi.python.org/pypi/txredis/0.1.1" target="_blank">http://pypi.python.org/pypi/txredis/0.1.1</a></li></ul>
+<h3><a name="redis-rb (Ruby)">redis-rb (Ruby)</a></h3><ul><li> A Ruby client library for the redis key value storage engine.</li><li> Author: <a href="http://brainspl.at/" target="_blank">Ezra Zygmuntowicz</a>, <a href="http://twitter.com/ezmobius" target="_blank">@ezmobius</a>.</li><li> Repository: <a href="http://github.com/ezmobius/redis-rb" target="_blank">http://github.com/ezmobius/redis-rb</a></li></ul>
+<h3><a name="scala-redis (Scala)">scala-redis (Scala)</a></h3><ul><li> A scala library for connecting to a redis server, or a cluster of redis nodes using consistent hashing on the client side.</li><li> Author: <a href="http://www.linkedin.com/in/alejandrocrosa" target="_blank">Alejandro Crosa</a>, <a href="http://twitter.com/alejandrocrosa" target="_blank">@alejandrocrosa</a>.</li><li> Repository: <a href="http://github.com/acrosa/scala-redis" target="_blank">http://github.com/acrosa/scala-redis</a></li></ul>
+<h3><a name="Tcl">Tcl</a></h3><ul><li> The official version is included in the Redis tarball since it's maintained by Salvatore. </li><li> Author: <a href="http://invece.org/" target="_blank">Salvatore Sanfilippo</a>, <a href="http://twitter.com/antirez" target="_blank">@antirez</a></li><li> Repository: <a href="http://github.com/antirez/redis/blob/master/redis.tcl" target="_blank">http://github.com/antirez/redis/blob/master/redis.tcl</a></li></ul>
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/SupportedPlatforms.html b/doc/SupportedPlatforms.html
new file mode 100644
index 000000000..3e1ac96c9
--- /dev/null
+++ b/doc/SupportedPlatforms.html
@@ -0,0 +1,37 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>SupportedPlatforms: Contents</b><br>&nbsp;&nbsp;<a href="#Supported Platforms">Supported Platforms</a>
+ </div>
+
+ <h1 class="wikiname">SupportedPlatforms</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+ <h1><a name="Supported Platforms">Supported Platforms</a></h1>Redis can be compiled in most POSIX systems, but the development targets mainly:<br/><br/><ul><li> Linux</li><li> Mac OS X</li><li> FreeBSD</li><li> OpenBSD</li><li> Solaris (startting with <a href="RoadMap.html">Version 1.1</a>)</li></ul>
+Windows (using CygWin) is not a supported platform.
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/TemplateCommand.html b/doc/TemplateCommand.html
new file mode 100644
index 000000000..7286836ed
--- /dev/null
+++ b/doc/TemplateCommand.html
@@ -0,0 +1,38 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>TemplateCommand: Contents</b><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Return value">Return value</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#See also">See also</a>
+ </div>
+
+ <h1 class="wikiname">TemplateCommand</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+
+<h2><a name="Return value">Return value</a></h2><a href="ReplyTypes.html">ReplyTypes</a><h2><a name="See also">See also</a></h2>
+<ul><li> []</li></ul>
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/TtlCommand.html b/doc/TtlCommand.html
new file mode 100644
index 000000000..94b308c83
--- /dev/null
+++ b/doc/TtlCommand.html
@@ -0,0 +1,38 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>TtlCommand: Contents</b><br>&nbsp;&nbsp;<a href="#TTL _key_">TTL _key_</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Return value">Return value</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#See also">See also</a>
+ </div>
+
+ <h1 class="wikiname">TtlCommand</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+ <h1><a name="TTL _key_">TTL _key_</a></h1><blockquote>The TTL command returns the remaining time to live in seconds of a key that has an <a href="ExpireCommand.html">EXPIRE</a> set. This introspection capability allows a Redis client to check how many seconds a given key will continue to be part of the dataset. If the Key does not exists or does not have an associated expire, -1 is returned.</blockquote>
+<h2><a name="Return value">Return value</a></h2><a href="ReplyTypes.html">Integer reply</a><h2><a name="See also">See also</a></h2>
+<ul><li> <a href="ExpireCommand.html">EXPIRE</a></li><li> <a href="TypeCommand.html">TYPE</a></li></ul>
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/TwitterAlikeExample.html b/doc/TwitterAlikeExample.html
new file mode 100644
index 000000000..0c75cc934
--- /dev/null
+++ b/doc/TwitterAlikeExample.html
@@ -0,0 +1,250 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>TwitterAlikeExample: Contents</b><br>&nbsp;&nbsp;<a href="#A case study: Design and implementation of a simple Twitter clone using only the Redis key-value store as database and PHP">A case study: Design and implementation of a simple Twitter clone using only the Redis key-value store as database and PHP</a><br>&nbsp;&nbsp;<a href="#Key-value stores basics">Key-value stores basics</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Atomic operations">Atomic operations</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Beyond key-value stores">Beyond key-value stores</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#The set data type">The set data type</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Prerequisites">Prerequisites</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Data layout">Data layout</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Following, followers and updates">Following, followers and updates</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Authentication">Authentication</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Updates">Updates</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Paginating updates">Paginating updates</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Following users">Following users</a><br>&nbsp;&nbsp;<a href="#Making it horizontally scalable">Making it horizontally scalable</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Hashing the key">Hashing the key</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Special keys">Special keys</a>
+ </div>
+
+ <h1 class="wikiname">TwitterAlikeExample</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+ <h1><a name="A case study: Design and implementation of a simple Twitter clone using only the Redis key-value store as database and PHP">A case study: Design and implementation of a simple Twitter clone using only the Redis key-value store as database and PHP</a></h1>In this article I'll explain the design and the implementation of a <a href="http://retwis.antirez.com" target="_blank">simple clone of Twitter</a> written using PHP and <a href="http://code.google.com/p/redis/" target="_blank">Redis</a> as only database. The programming community uses to look at key-value stores like special databases that can't be used as drop in replacement for a relational database for the development of web applications. This article will try to prove the contrary.<br/><br/>Our Twitter clone, <a href="http://retwis.antirez.com" target="_blank">called Retwis</a>, is structurally simple, has very good performances, and can be distributed among N web servers and M Redis servers with very little efforts. You can find the source code <a href="http://code.google.com/p/redis/downloads/list" target="_blank">here</a>.<br/><br/>We use PHP for the example since it can be read by everybody. The same (or... much better) results can be obtained using Ruby, Python, Erlang, and so on.<br/><br/><b>News! <a href="http://retwisrb.danlucraft.com/" target="_blank">Retwis-rb</a> is a port of Retwis to Ruby and Sinatra written by Daniel Lucraft!</b> With full source code included of course, the git repository is linked at the end of the Retwis-RB page. The rest of this article targets PHP, but Ruby programmers can also check the other source code, it conceptually very similar.<h1><a name="Key-value stores basics">Key-value stores basics</a></h1>
+The essence of a key-value store is the ability to store some data, called <i>value</i>, inside a key. This data can later be retrieved only if we know the exact key used to store it. There is no way to search something by value. So for example I can use the command SET to store the value <b>bar</b> at key <b>foo</b>:<br/><br/><pre class="codeblock python" name="code">
+SET foo bar
+</pre>Redis will store our data permanently, so we can later ask for &quot;<i>What is the value stored at key foo?</i>&quot; and Redis will reply with <b>bar</b>:<br/><br/><pre class="codeblock python python" name="code">
+GET foo =&gt; bar
+</pre>Other common operations provided by key-value stores are DEL used to delete a given key, and the associated value, SET-if-not-exists (called SETNX on Redis) that sets a key only if it does not already exist, and INCR that is able to atomically increment a number stored at a given key:<br/><br/><pre class="codeblock python python python" name="code">
+SET foo 10
+INCR foo =&gt; 11
+INCR foo =&gt; 12
+INCR foo =&gt; 13
+</pre><h2><a name="Atomic operations">Atomic operations</a></h2>
+So far it should be pretty simple, but there is something special about INCR. Think about this, why to provide such an operation if we can do it ourself with a bit of code? After all it is as simple as:<br/><br/><pre class="codeblock python python python python" name="code">
+x = GET foo
+x = x + 1
+SET foo x
+</pre>The problem is that doing the increment this way will work as long as there is only a client working with the value <i>x</i> at a time. See what happens if two computers are accessing this data at the same time:<br/><br/><pre class="codeblock python python python python python" name="code">
+x = GET foo (yields 10)
+y = GET foo (yields 10)
+x = x + 1 (x is now 11)
+y = y + 1 (y is now 11)
+SET foo x (foo is now 11)
+SET foo y (foo is now 11)
+</pre>Something is wrong with that! We incremented the value two times, but instead to go from 10 to 12 our key holds 11. This is because the INCR operation done with <code name="code" class="python">GET / increment / SET</code> <b>is not an atomic operation</b>. Instead the INCR provided by Redis, Memcached, ..., are atomic implementations, the server will take care to protect the get-increment-set for all the time needed to complete in order to prevent simultaneous accesses.<br/><br/>What makes Redis different from other key-value stores is that it provides more operations similar to INCR that can be used together to model complex problems. This is why you can use Redis to write whole web applications without using an SQL database and without to get mad.
+<h2><a name="Beyond key-value stores">Beyond key-value stores</a></h2>
+In this section we will see what Redis features we need to build our Twitter clone. The first thing to know is that Redis values can be more than strings. Redis supports Lists and Sets as values, and there are atomic operations to operate against this more advanced values so we are safe even with multiple accesses against the same key. Let's start from Lists:<br/><br/><pre class="codeblock python python python python python python" name="code">
+LPUSH mylist a (now mylist holds one element list 'a')
+LPUSH mylist b (now mylist holds 'b,a')
+LPUSH mylist c (now mylist holds 'c,b,a')
+</pre>LPUSH means <i>Left Push</i>, that is, add an element to the left (or to the head) of the list stored at <i>mylist</i>. If the key <i>mylist</i> does not exist it is automatically created by Redis as an empty list before the PUSH operation. As you can imagine, there is also the RPUSH operation that adds the element on the right of the list (on the tail).<br/><br/>This is very useful for our Twitter clone. Updates of users can be stored into a list stored at <code name="code" class="python">username:updates</code> for instance. There are operations to get data or information from Lists of course. For instance LRANGE returns a range of the list, or the whole list.<br/><br/><pre class="codeblock python python python python python python python" name="code">
+LRANGE mylist 0 1 =&gt; c,b
+</pre>LRANGE uses zero-based indexes, that is the first element is 0, the second 1, and so on. The command aguments are <code name="code" class="python">LRANGE key first-index last-index</code>. The <i>last index</i> argument can be negative, with a special meaning: -1 is the last element of the list, -2 the penultimate, and so on. So in order to get the whole list we can use:<br/><br/><pre class="codeblock python python python python python python python python" name="code">
+LRANGE mylist 0 -1 =&gt; c,b,a
+</pre>Other important operations are LLEN that returns the length of the list, and LTRIM that is like LRANGE but instead of returning the specified range <b>trims</b> the list, so it is like <i>Get range from mylist, Set this range as new value</i> but atomic. We will use only this List operations, but make sure to check the <a href="http://code.google.com/p/redis/wiki/README" target="_blank">Redis documentation</a> to discover all the List operations supported by Redis.
+<h3><a name="The set data type">The set data type</a></h3>
+There is more than Lists, Redis also supports Sets, that are unsorted collection of elements. It is possible to add, remove, and test for existence of members, and perform intersection between different Sets. Of course it is possible to ask for the list or the number of elements of a Set. Some example will make it more clear. Keep in mind that SADD is the <i>add to set</i> operation, SREM is the <i>remove from set</i> operation, <i>sismember</i> is the <i>test if it is a member</i> operation, and SINTER is <i>perform intersection</i> operation. Other operations are SCARD that is used to get the cardinality (the number of elements) of a Set, and SMEMBERS that will return all the members of a Set.<br/><br/><pre class="codeblock python python python python python python python python python" name="code">
+SADD myset a
+SADD myset b
+SADD myset foo
+SADD myset bar
+SCARD myset =&gt; 4
+SMEMBERS myset =&gt; bar,a,foo,b
+</pre>Note that SMEMBERS does not return the elements in the same order we added them, since Sets are <b>unsorted</b> collections of elements. When you want to store the order it is better to use Lists instead. Some more operations against Sets:<br/><br/><pre class="codeblock python python python python python python python python python python" name="code">
+SADD mynewset b
+SADD mynewset foo
+SADD mynewset hello
+SINTER myset mynewset =&gt; foo,b
+</pre>SINTER can return the intersection between Sets but it is not limited to two sets, you may ask for intersection of 4,5 or 10000 Sets. Finally let's check how SISMEMBER works:<br/><br/><pre class="codeblock python python python python python python python python python python python" name="code">
+SISMEMBER myset foo =&gt; 1
+SISMEMBER myset notamember =&gt; 0
+</pre>Ok I think we are ready to start coding!
+<h2><a name="Prerequisites">Prerequisites</a></h2>
+If you didn't download it already please <a href="http://code.google.com/p/redis/wiki/README" target="_blank">grab the source code of Retwis</a>. It's a simple tar.gz file with a few of .php files inside. The implementation is very simple. You will find the PHP library client inside (redis.php) that is used to talk with the Redis server from PHP. This library was written by <a href="http://qix.it" target="_blank">Ludovico Magnocavallo</a> and you are free to reuse this in your own projects, but for updated version of the library please download the Redis distribution.<br/><br/>Another thing you probably want is a working Redis server. Just get the source, compile with make, and run with ./redis-server and you are done. No configuration is required at all in order to play with it or to run Retwis in your computer.
+<h2><a name="Data layout">Data layout</a></h2>
+Working with a relational database this is the stage were the database layout should be produced in form of tables, indexes, and so on. We don't have tables, so what should be designed? We need to identify what keys are needed to represent our objects and what kind of values this keys need to hold.<br/><br/>Let's start from Users. We need to represent this users of course, with the username, userid, password, followers and following users, and so on. The first question is, what should identify an user inside our system? The username can be a good idea since it is unique, but it is also too big, and we want to stay low on memory. So like if our DB was a relational one we can associate an unique ID to every user. Every other reference to this user will be done by id. That's very simple to do, because we have our atomic INCR operation! When we create a new user we can do something like this, assuming the user is callled &quot;antirez&quot;:<br/><br/><pre class="codeblock python python python python python python python python python python python python" name="code">
+INCR global:nextUserId =&gt; 1000
+SET uid:1000:username antirez
+SET uid:1000:password p1pp0
+</pre>We use the <i>global:nextUserId</i> key in order to always get an unique ID for every new user. Then we use this unique ID to populate all the other keys holding our user data. <b>This is a Design Pattern</b> with key-values stores! Keep it in mind.
+Besides the fields already defined, we need some more stuff in order to fully define an User. For example sometimes it can be useful to be able to get the user ID from the username, so we set this key too:<br/><br/><pre class="codeblock python python python python python python python python python python python python python" name="code">
+SET username:antirez:uid 1000
+</pre>This may appear strange at first, but remember that we are only able to access data by key! It's not possible to tell Redis to return the key that holds a specific value. This is also <b>our strength</b>, this new paradigm is forcing us to organize the data so that everything is accessible by <i>primary key</i>, speaking with relational DBs language.
+<h2><a name="Following, followers and updates">Following, followers and updates</a></h2>
+There is another central need in our system. Every user has followers users and following users. We have a perfect data structure for this work! That is... Sets. So let's add this two new fields to our schema:<br/><br/><pre class="codeblock python python python python python python python python python python python python python python" name="code">
+uid:1000:followers =&gt; Set of uids of all the followers users
+uid:1000:following =&gt; Set of uids of all the following users
+</pre>Another important thing we need is a place were we can add the updates to display in the user home page. We'll need to access this data in chronological order later, from the most recent update to the older ones, so the perfect kind of Value for this work is a List. Basically every new update will be LPUSHed in the user updates key, and thanks to LRANGE we can implement pagination and so on. Note that we use the words <i>updates</i> and <i>posts</i> interchangeably, since updates are actually &quot;little posts&quot; in some way.<br/><br/><pre class="codeblock python python python python python python python python python python python python python python python" name="code">
+uid:1000:posts =&gt; a List of post ids, every new post is LPUSHed here.
+</pre>
+<h2><a name="Authentication">Authentication</a></h2>
+Ok we have more or less everything about the user, but authentication. We'll handle authentication in a simple but robust way: we don't want to use PHP sessions or other things like this, our system must be ready in order to be distributed among different servers, so we'll take the whole state in our Redis database. So all we need is a random string to set as the cookie of an authenticated user, and a key that will tell us what is the user ID of the client holding such a random string. We need two keys in order to make this thing working in a robust way:<br/><br/><pre class="codeblock python python python python python python python python python python python python python python python python" name="code">
+SET uid:1000:auth fea5e81ac8ca77622bed1c2132a021f9
+SET auth:fea5e81ac8ca77622bed1c2132a021f9 1000
+</pre>In order to authenticate an user we'll do this simple work (login.php):
+<ul><li> Get the username and password via the login form</li><li> Check if the username:<code name="code" class="python">&lt;username&gt;</code>:uid key actually exists</li><li> If it exists we have the user id, (i.e. 1000)</li><li> Check if uid:1000:password matches, if not, error message</li><li> Ok authenticated! Set &quot;fea5e81ac8ca77622bed1c2132a021f9&quot; (the value of uid:1000:auth) as &quot;auth&quot; cookie</li></ul>
+This is the actual code:<br/><br/><pre class="codeblock python python python python python python python python python python python python python python python python python" name="code">
+include(&quot;retwis.php&quot;);
+
+# Form sanity checks
+if (!gt(&quot;username&quot;) || !gt(&quot;password&quot;))
+ goback(&quot;You need to enter both username and password to login.&quot;);
+
+# The form is ok, check if the username is available
+$username = gt(&quot;username&quot;);
+$password = gt(&quot;password&quot;);
+$r = redisLink();
+$userid = $r-&gt;get(&quot;username:$username:id&quot;);
+if (!$userid)
+ goback(&quot;Wrong username or password&quot;);
+$realpassword = $r-&gt;get(&quot;uid:$userid:password&quot;);
+if ($realpassword != $password)
+ goback(&quot;Wrong useranme or password&quot;);
+
+# Username / password OK, set the cookie and redirect to index.php
+$authsecret = $r-&gt;get(&quot;uid:$userid:auth&quot;);
+setcookie(&quot;auth&quot;,$authsecret,time()+3600*24*365);
+header(&quot;Location: index.php&quot;);
+</pre>This happens every time the users log in, but we also need a function isLoggedIn in order to check if a given user is already authenticated or not. These are the logical steps preformed by the <code name="code" class="python">isLoggedIn</code> function:
+<ul><li> Get the &quot;auth&quot; cookie from the user. If there is no cookie, the user is not logged in, of course. Let's call the value of this cookie <code name="code" class="python">&lt;authcookie&gt;</code></li><li> Check if auth:<code name="code" class="python">&lt;authcookie&gt;</code> exists, and what the value (the user id) is (1000 in the exmple).</li><li> In order to be sure check that uid:1000:auth matches.</li><li> Ok the user is authenticated, and we loaded a bit of information in the $User global variable.</li></ul>
+The code is simpler than the description, possibly:<br/><br/><pre class="codeblock python python python python python python python python python python python python python python python python python python" name="code">
+function isLoggedIn() {
+ global $User, $_COOKIE;
+
+ if (isset($User)) return true;
+
+ if (isset($_COOKIE['auth'])) {
+ $r = redisLink();
+ $authcookie = $_COOKIE['auth'];
+ if ($userid = $r-&gt;get(&quot;auth:$authcookie&quot;)) {
+ if ($r-&gt;get(&quot;uid:$userid:auth&quot;) != $authcookie) return false;
+ loadUserInfo($userid);
+ return true;
+ }
+ }
+ return false;
+}
+
+function loadUserInfo($userid) {
+ global $User;
+
+ $r = redisLink();
+ $User['id'] = $userid;
+ $User['username'] = $r-&gt;get(&quot;uid:$userid:username&quot;);
+ return true;
+}
+</pre><code name="code" class="python">loadUserInfo</code> as separated function is an overkill for our application, but it's a good template for a complex application. The only thing it's missing from all the authentication is the logout. What we do on logout? That's simple, we'll just change the random string in uid:1000:auth, remove the old auth:<code name="code" class="python">&lt;oldauthstring&gt;</code> and add a new auth:<code name="code" class="python">&lt;newauthstring&gt;</code>.<br/><br/><b>Important:</b> the logout procedure explains why we don't just authenticate the user after the lookup of auth:<code name="code" class="python">&lt;randomstring&gt;</code>, but double check it against uid:1000:auth. The true authentication string is the latter, the auth:<code name="code" class="python">&lt;randomstring&gt;</code> is just an authentication key that may even be volatile, or if there are bugs in the program or a script gets interrupted we may even end with multiple auth:<code name="code" class="python">&lt;something&gt;</code> keys pointing to the same user id. The logout code is the following (logout.php):<br/><br/><pre class="codeblock python python python python python python python python python python python python python python python python python python python" name="code">
+include(&quot;retwis.php&quot;);
+
+if (!isLoggedIn()) {
+ header(&quot;Location: index.php&quot;);
+ exit;
+}
+
+$r = redisLink();
+$newauthsecret = getrand();
+$userid = $User['id'];
+$oldauthsecret = $r-&gt;get(&quot;uid:$userid:auth&quot;);
+
+$r-&gt;set(&quot;uid:$userid:auth&quot;,$newauthsecret);
+$r-&gt;set(&quot;auth:$newauthsecret&quot;,$userid);
+$r-&gt;delete(&quot;auth:$oldauthsecret&quot;);
+
+header(&quot;Location: index.php&quot;);
+</pre>That is just what we described and should be simple to undestand.
+<h2><a name="Updates">Updates</a></h2>
+Updates, also known as posts, are even simpler. In order to create a new post on the database we do something like this:<br/><br/><pre class="codeblock python python python python python python python python python python python python python python python python python python python python" name="code">
+INCR global:nextPostId =&gt; 10343
+SET post:10343 &quot;$owner_id|$time|I'm having fun with Retwis&quot;
+</pre>As you can se the user id and time of the post are stored directly inside the string, we don't need to lookup by time or user id in the example application so it is better to compact everything inside the post string.<br/><br/>After we create a post we obtain the post id. We need to LPUSH this post id in every user that's following the author of the post, and of course in the list of posts of the author. This is the file update.php that shows how this is performed:<br/><br/><pre class="codeblock python python python python python python python python python python python python python python python python python python python python python" name="code">
+include(&quot;retwis.php&quot;);
+
+if (!isLoggedIn() || !gt(&quot;status&quot;)) {
+ header(&quot;Location:index.php&quot;);
+ exit;
+}
+
+$r = redisLink();
+$postid = $r-&gt;incr(&quot;global:nextPostId&quot;);
+$status = str_replace(&quot;\n&quot;,&quot; &quot;,gt(&quot;status&quot;));
+$post = $User['id'].&quot;|&quot;.time().&quot;|&quot;.$status;
+$r-&gt;set(&quot;post:$postid&quot;,$post);
+$followers = $r-&gt;smembers(&quot;uid:&quot;.$User['id'].&quot;:followers&quot;);
+if ($followers === false) $followers = Array();
+$followers[] = $User['id']; /* Add the post to our own posts too */
+
+foreach($followers as $fid) {
+ $r-&gt;push(&quot;uid:$fid:posts&quot;,$postid,false);
+}
+# Push the post on the timeline, and trim the timeline to the
+# newest 1000 elements.
+$r-&gt;push(&quot;global:timeline&quot;,$postid,false);
+$r-&gt;ltrim(&quot;global:timeline&quot;,0,1000);
+
+header(&quot;Location: index.php&quot;);
+</pre>The core of the function is the <code name="code" class="python">foreach</code>. We get using SMEMBERS all the followers of the current user, then the loop will LPUSH the post against the uid:<code name="code" class="python">&lt;userid&gt;</code>:posts of every follower.<br/><br/>Note that we also maintain a timeline with all the posts. In order to do so what is needed is just to LPUSH the post against global:timeline. Let's face it, do you start thinking it was a bit strange to have to sort things added in chronological order using ORDER BY with SQL? I think so indeed.
+<h2><a name="Paginating updates">Paginating updates</a></h2>
+Now it should be pretty clear how we can user LRANGE in order to get ranges of posts, and render this posts on the screen. The code is simple:<br/><br/><pre class="codeblock python python python python python python python python python python python python python python python python python python python python python python" name="code">
+function showPost($id) {
+ $r = redisLink();
+ $postdata = $r-&gt;get(&quot;post:$id&quot;);
+ if (!$postdata) return false;
+
+ $aux = explode(&quot;|&quot;,$postdata);
+ $id = $aux[0];
+ $time = $aux[1];
+ $username = $r-&gt;get(&quot;uid:$id:username&quot;);
+ $post = join(array_splice($aux,2,count($aux)-2),&quot;|&quot;);
+ $elapsed = strElapsed($time);
+ $userlink = &quot;&lt;a class=\&quot;username\&quot; href=\&quot;profile.php?u=&quot;.urlencode($username).&quot;\&quot;&gt;&quot;.utf8entities($username).&quot;&lt;/a&gt;&quot;;
+
+ echo('&lt;div class=&quot;post&quot;&gt;'.$userlink.' '.utf8entities($post).&quot;&lt;br&gt;&quot;);
+ echo('&lt;i&gt;posted '.$elapsed.' ago via web&lt;/i&gt;&lt;/div&gt;');
+ return true;
+}
+
+function showUserPosts($userid,$start,$count) {
+ $r = redisLink();
+ $key = ($userid == -1) ? &quot;global:timeline&quot; : &quot;uid:$userid:posts&quot;;
+ $posts = $r-&gt;lrange($key,$start,$start+$count);
+ $c = 0;
+ foreach($posts as $p) {
+ if (showPost($p)) $c++;
+ if ($c == $count) break;
+ }
+ return count($posts) == $count+1;
+}
+</pre><code name="code" class="python">showPost</code> will simply convert and print a Post in HTML while <code name="code" class="python">showUserPosts</code> get range of posts passing them to <code name="code" class="python">showPosts</code>.<h2><a name="Following users">Following users</a></h2>If user id 1000 (antirez) wants to follow user id 1001 (pippo), we can do this with just two SADD:<br/><br/><pre class="codeblock python python python python python python python python python python python python python python python python python python python python python python python" name="code">
+SADD uid:1000:following 1001
+SADD uid:1001:followers 1000
+</pre>Note the same pattern again and again, in theory with a relational database the list of following and followers is a single table with fields like <code name="code" class="python">following_id</code> and <code name="code" class="python">follower_id</code>. With queries you can extract the followers or following of every user. With a key-value DB that's a bit different as we need to set both the <code name="code" class="python">1000 is following 1001</code> and <code name="code" class="python">1001 is followed by 1000</code> relations. This is the price to pay, but on the other side accessing the data is simpler and ultra-fast. And having this things as separated sets allows us to do interesting stuff, for example using SINTER we can have the intersection of 'following' of two different users, so we may add a feature to our Twitter clone so that it is able to say you at warp speed, when you visit somebody' else profile, &quot;you and foobar have 34 followers in common&quot; and things like that.<br/><br/>You can find the code that sets or removes a following/follower relation at follow.php. It is trivial as you can see.
+<h1><a name="Making it horizontally scalable">Making it horizontally scalable</a></h1>
+Gentle reader, if you reached this point you are already an hero, thank you. Before to talk about scaling horizontally it is worth to check the performances on a single server. Retwis is <b>amazingly fast</b>, without any kind of cache. On a very slow and loaded server, apache benchmark with 100 parallel clients issuing 100000 requests measured the average pageview to take 5 milliseconds. This means you can serve millions of users every day with just a single Linux box, and this one was monkey asses slow! Go figure with more recent hardware.<br/><br/>So, first of all, probably you will not need more than one server for a lot of applications, even when you have a lot of users. But let's assume we <b>are</b> Twitter and need to handle a huge amount of traffic. What to do?
+<h3><a name="Hashing the key">Hashing the key</a></h3>
+The first thing to do is to hash the key and issue the request on different servers based on the key hash. There are a lot of well known algorithms to do so, for example check the Redis Ruby library client that implements <i>consistent hashing</i>, but the general idea is that you can turn your key into a number, and than take the reminder of the division of this number by the number of servers you have:<br/><br/><pre class="codeblock python python python python python python python python python python python python python python python python python python python python python python python python" name="code">
+server_id = crc32(key) % number_of_servers
+</pre>This has a lot of problems since if you add one server you need to move too much keys and so on, but this is the general idea even if you use a better hashing scheme like consistent hashing.<br/><br/>Ok, are key accesses distributed among the key space? Well, all the user data will be partitioned among different servers. There are no inter-keys operations used (like SINTER, otherwise you need to care that things you want to intersect will end in the same server. <b>This is why Redis unlike memcached does not force a specific hashing scheme, it's application specific</b>). Btw there are keys that are accessed more frequently.<h3><a name="Special keys">Special keys</a></h3>For example every time we post a new message, we <b>need</b> to increment the <code name="code" class="python">global:nextPostId</code> key. How to fix this problem? A Single server will get a lot if increments. The simplest way to handle this is to have a dedicated server just for increments. This is probably an overkill btw unless you have really a lot of traffic. There is another trick. The ID does not really need to be an incremental number, but just <b>it needs to be unique</b>. So you can get a random string long enough to be unlikely (almost impossible, if it's md5-size) to collide, and you are done. We successfully eliminated our main problem to make it really horizontally scalable!<br/><br/>There is another one: global:timeline. There is no fix for this, if you need to take something in order you can split among different servers and <b>then merge</b> when you need to get the data back, or take it ordered and use a single key. Again if you really have so much posts per second, you can use a single server just for this. Remember that with commodity hardware Redis is able to handle 100000 writes for second, that's enough even for Twitter, I guess.<br/><br/>Please feel free to use the comments below for questions and feedbacks.
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/TypeCommand.html b/doc/TypeCommand.html
new file mode 100644
index 000000000..3d30a991e
--- /dev/null
+++ b/doc/TypeCommand.html
@@ -0,0 +1,44 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>TypeCommand: Contents</b><br>&nbsp;&nbsp;<a href="#TYPE _key_">TYPE _key_</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Return value">Return value</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#See also">See also</a>
+ </div>
+
+ <h1 class="wikiname">TypeCommand</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+ <h1><a name="TYPE _key_">TYPE _key_</a></h1>
+<i>Time complexity: O(1)</i><blockquote>Return the type of the value stored at <i>key</i> in form of astring. The type can be one of &quot;none&quot;, &quot;string&quot;, &quot;list&quot;, &quot;set&quot;.&quot;none&quot; is returned if the key does not exist.</blockquote>
+<h2><a name="Return value">Return value</a></h2><a href="ReplyTypes.html">Status code reply</a>, specifically:<br/><br/><pre class="codeblock python" name="code">
+&quot;none&quot; if the key does not exist
+&quot;string&quot; if the key contains a String value
+&quot;list&quot; if the key contains a List value
+&quot;set&quot; if the key contains a Set value
+</pre><h2><a name="See also">See also</a></h2>
+<ul><li> <a href="DataTypes.html">Redis Data Types</a></li></ul>
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/UnstableSource.html b/doc/UnstableSource.html
new file mode 100644
index 000000000..90afdfa33
--- /dev/null
+++ b/doc/UnstableSource.html
@@ -0,0 +1,39 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>UnstableSource: Contents</b><br>&nbsp;&nbsp;<a href="#Get the latest Redis source code">Get the latest Redis source code</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Unstable code">Unstable code</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Stable code">Stable code</a>
+ </div>
+
+ <h1 class="wikiname">UnstableSource</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+ <h1><a name="Get the latest Redis source code">Get the latest Redis source code</a></h1><h2><a name="Unstable code">Unstable code</a></h2>
+The development version of Redis is <a href="http://github.com/antirez/redis/tree/master" target="_blank">hosted here at Github</a>, have fun cloning the source code with Git. If you are not familar with Git just use the <b>download</b> button to get a tarball.<h2><a name="Stable code">Stable code</a></h2>
+<b>Warning:</b> the development source code is only intended for people that want to develop Redis or absolutely need the latest features still not available on the stable releases. You may have a better experience with the <a href="http://code.google.com/p/redis/downloads/list" target="_blank">latest stable tarball</a>.
+
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/ZaddCommand.html b/doc/ZaddCommand.html
new file mode 100644
index 000000000..d798eb2be
--- /dev/null
+++ b/doc/ZaddCommand.html
@@ -0,0 +1,44 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>ZaddCommand: Contents</b><br>&nbsp;&nbsp;<a href="#ZADD _key_ _score_ _member_ (Redis &gt;">ZADD _key_ _score_ _member_ (Redis &gt;</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Return value">Return value</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#See also">See also</a>
+ </div>
+
+ <h1 class="wikiname">ZaddCommand</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+ <h1><a name="ZADD _key_ _score_ _member_ (Redis &gt;">ZADD _key_ _score_ _member_ (Redis &gt;</a></h1> 1.1) =
+<i>Time complexity O(log(N)) with N being the number of elements in the sorted set</i><blockquote>Add the specified <i>member</i> having the specifeid <i>score</i> to the sortedset stored at <i>key</i>. If <i>member</i> is already a member of the sorted setthe score is updated, and the element reinserted in the right position toensure sorting. If <i>key</i> does not exist a new sorted set with the specified_member_ as sole member is crated. If the key exists but does not hold asorted set value an error is returned.</blockquote>
+<blockquote>The score value can be the string representation of a double precision floatingpoint number.</blockquote>
+<blockquote>For an introduction to sorted sets check the <a href="RedisSortedSets.html">Redis sorted sets</a> page.</blockquote>
+<h2><a name="Return value">Return value</a></h2><a href="ReplyTypes.html">Integer reply</a>, specifically:<br/><br/><pre class="codeblock python" name="code">
+1 if the new element was added
+0 if the element was already a member of the sorted set and the score was updated
+</pre><h2><a name="See also">See also</a></h2>
+<ul><li> <a href="ZremCommand.html">ZREM</a></li><li> <a href="ZrangeCommand.html">ZRANGE</a></li><li> <a href="ZrangeCommand.html">ZREVRANGE</a></li><li> <a href="ZrangebyscoreCommand.html">ZRANGEBYSCORE</a></li><li> <a href="ZcardCommand.html">ZCARD</a></li><li> <a href="ZscoreCommand.html">ZSCORE</a></li></ul>
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/ZcardCommand.html b/doc/ZcardCommand.html
new file mode 100644
index 000000000..6ea758e22
--- /dev/null
+++ b/doc/ZcardCommand.html
@@ -0,0 +1,42 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>ZcardCommand: Contents</b><br>&nbsp;&nbsp;<a href="#ZCARD _key_ (Redis &gt;">ZCARD _key_ (Redis &gt;</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Return value">Return value</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#See also">See also</a>
+ </div>
+
+ <h1 class="wikiname">ZcardCommand</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+ <h1><a name="ZCARD _key_ (Redis &gt;">ZCARD _key_ (Redis &gt;</a></h1> 1.1) =
+<i>Time complexity O(1)</i><blockquote>Return the sorted set cardinality (number of elements). If the <i>key</i> does notexist 0 is returned, like for empty sorted sets.</blockquote>
+<h2><a name="Return value">Return value</a></h2><a href="ReplyTypes.html">Integer reply</a>, specifically:<br/><br/><pre class="codeblock python" name="code">
+the cardinality (number of elements) of the set as an integer.
+</pre><h2><a name="See also">See also</a></h2>
+<ul><li> <a href="ZaddCommand.html">ZADD</a></li><li> <a href="ZremCommand.html">ZREM</a></li><li> <a href="ZrangeCommand.html">ZRANGE</a></li><li> <a href="ZrangeCommand.html">ZREVRANGE</a></li><li> <a href="ZrangebyscoreCommand.html">ZRANGEBYSCORE</a></li><li> <a href="ZscoreCommand.html">ZSCORE</a></li></ul>
+
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/ZrangeCommand.html b/doc/ZrangeCommand.html
new file mode 100644
index 000000000..9402fa493
--- /dev/null
+++ b/doc/ZrangeCommand.html
@@ -0,0 +1,42 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>ZrangeCommand: Contents</b><br>&nbsp;&nbsp;<a href="#ZRANGE _key_ _start_ _end_ (Redis &gt;">ZRANGE _key_ _start_ _end_ (Redis &gt;</a><br>&nbsp;&nbsp;<a href="#ZREVRANGE _key_ _start_ _end_ (Redis &gt;">ZREVRANGE _key_ _start_ _end_ (Redis &gt;</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Return value">Return value</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#See also">See also</a>
+ </div>
+
+ <h1 class="wikiname">ZrangeCommand</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+ <h1><a name="ZRANGE _key_ _start_ _end_ (Redis &gt;">ZRANGE _key_ _start_ _end_ (Redis &gt;</a></h1> 1.1) =
+<h1><a name="ZREVRANGE _key_ _start_ _end_ (Redis &gt;">ZREVRANGE _key_ _start_ _end_ (Redis &gt;</a></h1> 1.1) =
+<i>Time complexity: O(log(N))+O(M) (with N being the number of elements in the sorted set and M the number of elements requested)</i><blockquote>Return the specified elements of the sorted set at the specifiedkey. The elements are considered sorted from the lowerest to the highestscore when using ZRANGE, and in the reverse order when using ZREVRANGE.Start and end are zero-based indexes. 0 is the first elementof the sorted set (the one with the lowerest score when using ZRANGE), 1the next element by score and so on.</blockquote>
+<blockquote>_start_ and <i>end</i> can also be negative numbers indicating offsetsfrom the end of the sorted set. For example -1 is the last element ofthe sorted set, -2 the penultimate element and so on.</blockquote>
+<blockquote>Indexes out of range will not produce an error: if start is overthe end of the sorted set, or start <code name="code" class="python">&gt;</code> end, an empty list is returned.If end is over the end of the sorted set Redis will threat it just likethe last element of the sorted set.</blockquote>
+<h2><a name="Return value">Return value</a></h2><a href="ReplyTypes.html">Multi bulk reply</a>, specifically a list of elements in the specified range.<h2><a name="See also">See also</a></h2>
+<ul><li> <a href="ZaddCommand.html">ZADD</a></li><li> <a href="ZremCommand.html">ZREM</a></li><li> <a href="ZrangeCommand.html">ZRANGE</a></li><li> <a href="ZrangeCommand.html">ZREVRANGE</a></li><li> <a href="ZcardCommand.html">ZCARD</a></li><li> <a href="ZscoreCommand.html">ZSCORE</a></li></ul>
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/ZrangebyscoreCommand.html b/doc/ZrangebyscoreCommand.html
new file mode 100644
index 000000000..5ea3f3729
--- /dev/null
+++ b/doc/ZrangebyscoreCommand.html
@@ -0,0 +1,39 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>ZrangebyscoreCommand: Contents</b><br>&nbsp;&nbsp;<a href="#ZRANGEBYSCORE _key_ _min_ _max_ (Redis &gt;">ZRANGEBYSCORE _key_ _min_ _max_ (Redis &gt;</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Return value">Return value</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#See also">See also</a>
+ </div>
+
+ <h1 class="wikiname">ZrangebyscoreCommand</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+ <h1><a name="ZRANGEBYSCORE _key_ _min_ _max_ (Redis &gt;">ZRANGEBYSCORE _key_ _min_ _max_ (Redis &gt;</a></h1> 1.1) =
+<i>Time complexity: O(log(N))+O(M) with N being the number of elements in the sorted set and M the number of elements matching the min and max score</i><blockquote>Return the all the elements in the sorted set at key with a score between_min_ and <i>max</i> (including elements with score equal to min or max).</blockquote>
+<blockquote>The elements having the same score are returned sorted lexicographically asASCII strings (this follows from a property of Redis sorted sets and does notinvolve further computation).</blockquote>
+<h2><a name="Return value">Return value</a></h2><a href="ReplyTypes.html">Multi bulk reply</a>, specifically a list of elements in the specified score range.<h2><a name="See also">See also</a></h2><ul><li> <a href="ZaddCommand.html">ZADD</a></li><li> <a href="ZremCommand.html">ZREM</a></li><li> <a href="ZrangeCommand.html">ZRANGE</a></li><li> <a href="ZrangeCommand.html">ZREVRANGE</a></li><li> <a href="ZcardCommand.html">ZCARD</a></li><li> <a href="ZscoreCommand.html">ZSCORE</a></li></ul>
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/ZremCommand.html b/doc/ZremCommand.html
new file mode 100644
index 000000000..f23f82d04
--- /dev/null
+++ b/doc/ZremCommand.html
@@ -0,0 +1,41 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>ZremCommand: Contents</b><br>&nbsp;&nbsp;<a href="#ZREM _key_ _member_ (Redis &gt;">ZREM _key_ _member_ (Redis &gt;</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Return value">Return value</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#See also">See also</a>
+ </div>
+
+ <h1 class="wikiname">ZremCommand</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+ <h1><a name="ZREM _key_ _member_ (Redis &gt;">ZREM _key_ _member_ (Redis &gt;</a></h1> 1.1) =
+<i>Time complexity O(log(N)) with N being the number of elements in the sorted set</i><blockquote>Remove the specified <i>member</i> from the sorted set value stored at <i>key</i>. If_member_ was not a member of the set no operation is performed. If <i>key</i>does not not hold a set value an error is returned.</blockquote>
+<h2><a name="Return value">Return value</a></h2><a href="ReplyTypes.html">Integer reply</a>, specifically:<br/><br/><pre class="codeblock python" name="code">
+1 if the new element was removed
+0 if the new element was not a member of the set
+</pre><h2><a name="See also">See also</a></h2><ul><li> <a href="ZaddCommand.html">ZADD</a></li><li> <a href="ZrangeCommand.html">ZRANGE</a></li><li> <a href="ZrangeCommand.html">ZREVRANGE</a></li><li> <a href="ZrangebyscoreCommand.html">ZRANGEBYSCORE</a></li><li> <a href="ZcardCommand.html">ZCARD</a></li><li> <a href="ZscoreCommand.html">ZSCORE</a></li></ul>
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/ZscoreCommand.html b/doc/ZscoreCommand.html
new file mode 100644
index 000000000..b06c7e55c
--- /dev/null
+++ b/doc/ZscoreCommand.html
@@ -0,0 +1,41 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>ZscoreCommand: Contents</b><br>&nbsp;&nbsp;<a href="#ZSCORE _key_ _element_ (Redis &gt;">ZSCORE _key_ _element_ (Redis &gt;</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Return value">Return value</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#See also">See also</a>
+ </div>
+
+ <h1 class="wikiname">ZscoreCommand</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+ <h1><a name="ZSCORE _key_ _element_ (Redis &gt;">ZSCORE _key_ _element_ (Redis &gt;</a></h1> 1.1) =
+<i>Time complexity O(1)</i><blockquote>Return the score of the specified element of the sorted set at key.If the specified element does not exist in the sorted set, or the keydoes not exist at all, a special 'nil' value is returned.</blockquote>
+<h2><a name="Return value">Return value</a></h2><a href="ReplyTypes.html">Bulk reply</a><pre class="codeblock python" name="code">
+the score (a double precision floating point number) represented as string.
+</pre><h2><a name="See also">See also</a></h2>
+<ul><li> <a href="ZaddCommand.html">ZADD</a></li><li> <a href="ZremCommand.html">ZREM</a></li><li> <a href="ZrangeCommand.html">ZRANGE</a></li><li> <a href="ZrangeCommand.html">ZREVRANGE</a></li><li> <a href="ZrangebyscoreCommand.html">ZRANGEBYSCORE</a></li><li> <a href="ZcardCommand.html">ZCARD</a></li></ul>
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+
diff --git a/doc/index.html b/doc/index.html
new file mode 100644
index 000000000..a5e1ca719
--- /dev/null
+++ b/doc/index.html
@@ -0,0 +1,40 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <link type="text/css" rel="stylesheet" href="style.css" />
+ </head>
+ <body>
+ <div id="page">
+
+ <div id='header'>
+ <a href="index.html">
+ <img style="border:none" alt="Redis Documentation" src="redis.png">
+ </a>
+ </div>
+
+ <div id="pagecontent">
+ <div class="index">
+<!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
+<b>index: Contents</b><br>&nbsp;&nbsp;<a href="#Redis Documentation">Redis Documentation</a><br>&nbsp;&nbsp;<a href="#HOWTOs about selected features">HOWTOs about selected features</a><br>&nbsp;&nbsp;<a href="#Hacking">Hacking</a><br>&nbsp;&nbsp;<a href="#Videos">Videos</a>
+ </div>
+
+ <h1 class="wikiname">index</h1>
+
+ <div class="summary">
+
+ </div>
+
+ <div class="narrow">
+ <h1><a name="Redis Documentation">Redis Documentation</a></h1>Hello! The followings are pointers to different parts of the Redis Documentation.<br/><br/><ul><li> <a href="README.html">The README</a> is the best starting point to know more about the project.</li><li> <a href="QuickStart.html">This short Quick Start</a> provides a five minutes step-by-step istructions on how to download, compile, run and test the basic workings of a Redis server.</li><li> <a href="CommandReference.html">The command reference</a> is a description of all the Redis commands with links to command specific pages.</li><li> <a href="TwitterAlikeExample.html">This is a tuturial about creating a Twitter clone using *only* Redis as database, no relational DB at all is used</a>, it is a good start to understand the key-value database paradigm.</li><li> <a href="Features.html">The features page</a> (currently in draft) is a good start to understand the strength and limitations of Redis.</li><li> <a href="Benchmarks.html">The benchmark page</a> is about the speed performances of Redis.</li><li> <a href="FAQ.html">Our FAQ</a> contains of course some answers to common questions about Redis.</li></ul>
+<h1><a name="HOWTOs about selected features">HOWTOs about selected features</a></h1><ul><li> <a href="ReplicationHowto.html">The Redis Replication HOWTO</a> is what you need to read in order to understand how Redis master <code name="code" class="python">&lt;-&gt;</code> slave replication works.</li><li> <a href="AppendOnlyFileHowto.html">The Append Only File HOWTO</a> explains how the alternative Redis durability mode works. AOF is an alternative to snapshotting on disk from time to time (the default).</li></ul>
+<h1><a name="Hacking">Hacking</a></h1>
+<ul><li> <a href="ProtocolSpecification.html">The Protocol Specification</a> is all you need in order to implement a Redis client library for a missing language. PHP, Python, Ruby and Erlang are already supported.</li></ul>
+<h1><a name="Videos">Videos</a></h1><ul><li> <a href="http://mwrc2009.confreaks.com/13-mar-2009-19-24-redis-key-value-nirvana-ezra-zygmuntowicz.html" target="_blank">watch the Ezra Zygmuntowicz talk about Redis</a> to know the most important Redis ideas in few minutes.</li></ul>
+ </div>
+
+ </div>
+ </div>
+ </body>
+</html>
+