git » nmdb » commit 5b58d24

Document nmdb_incr() in the design document.

author Alberto Bertogli
2007-08-28 06:29:49 UTC
committer Alberto Bertogli
2007-08-28 06:29:49 UTC
parent 4f8a300ba66082b51780d166eb72accaba68da38

Document nmdb_incr() in the design document.

Signed-off-by: Alberto Bertogli <albertito@gmail.com>

doc/design.rst +6 -0

diff --git a/doc/design.rst b/doc/design.rst
index ea929d0..52658c6 100644
--- a/doc/design.rst
+++ b/doc/design.rst
@@ -41,6 +41,9 @@ get *key*
   Retrieves the value for the given key. If the key is in the cache, it
   returns immediately. If not, it performs a query in the database.
 
+incr *key* *increment*
+  Increments the value associated to the given key by the given increment.
+
 set_async *key* *value*
   Stores the *(key, value)* pair in the database. It does the set in the cache,
   queues the operation for the database, and returns.
@@ -69,6 +72,9 @@ cache_cas *key* *oldvalue* *newvalue*
   Do a compare-and-swap, using *oldvalue* to compare with the value stored in
   the database, and replacing it with *newvalue* if they match.
 
+cache_incr *key* *increment*
+  Like *incr*, but only affects the cache and not the database.
+
 As you can see, it's possible to operate exclusively with the cache, ignoring
 the database completely. This is very similar to what memcached_ does. Note
 that the downside is that it's possible to mess with the cache, and leave it