[sr-dev] git:master: ndb_redis: README file update for redis_free function.
Vicente Hernando
vhernando at systemonenoc.com
Tue Jun 19 12:21:16 CEST 2012
Module: sip-router
Branch: master
Commit: 95ca295c7db108c688d7f9278d089dcd6660d712
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=95ca295c7db108c688d7f9278d089dcd6660d712
Author: Vicente Hernando <vhernando at systemonenoc.com>
Committer: Vicente Hernando <vhernando at systemonenoc.com>
Date: Tue Jun 19 12:18:30 2012 +0200
ndb_redis: README file update for redis_free function.
---
modules/ndb_redis/README | 33 +++++++++++++++++++++++++++++++--
1 files changed, 31 insertions(+), 2 deletions(-)
diff --git a/modules/ndb_redis/README b/modules/ndb_redis/README
index e0258a3..f66c4db 100644
--- a/modules/ndb_redis/README
+++ b/modules/ndb_redis/README
@@ -10,7 +10,13 @@ Daniel-Constantin Mierla
<miconda at gmail.com>
- Copyright © 2011 asipto.com
+Vicente Hernando
+
+ <vhernando at systemonenoc.com>
+
+ Copyright © 2011 asipto.com
+
+ Copyright © 2012 www.systemonenoc.com
__________________________________________________________________
Table of Contents
@@ -30,11 +36,13 @@ Daniel-Constantin Mierla
4. Functions
4.1. redis_cmd(srvname, command, replyid)
+ 4.2. redis_free(replyid)
List of Examples
1.1. Set server parameter
1.2. redis_cmd usage
+ 1.3. redis_free usage
Chapter 1. Admin Guide
@@ -53,6 +61,7 @@ Chapter 1. Admin Guide
4. Functions
4.1. redis_cmd(srvname, command, replyid)
+ 4.2. redis_free(replyid)
1. Overview
@@ -107,8 +116,9 @@ modparam("ndb_redis", "server", "name=srvX;addr=127.0.0.2;port=6379;db=4")
4. Functions
4.1. redis_cmd(srvname, command, replyid)
+ 4.2. redis_free(replyid)
-4.1. redis_cmd(srvname, command, replyid)
+4.1. redis_cmd(srvname, command, replyid)
Send a command to REDIS server identified by srvname. The reply will be
stored in a local continer identified by replyid. All the parameters
@@ -148,3 +158,22 @@ if(redis_cmd("srvN", "HMGET foo_key field1 field3", "r")) {
xlog("first values: $redis(r=>value[0]) , $redis(r=>value[1])\n");
}
...
+
+4.2. redis_free(replyid)
+
+ Free a previous reply from memory. After this function call, accessing
+ to a freed replyid returns null value.
+
+ It is not necessary to free a reply to use it again in a new redis_cmd
+ function. When ndb_redis module closes, all pending replies are freed
+ automatically, so you only need to use this function if you perform a
+ lot of redis command requests with different replyid.
+
+ Example 1.3. redis_free usage
+...
+After a redis command call:
+ redis_cmd("srvN", "INCR cnt", "r");
+
+when reply not used anymore:
+ redis_free("r");
+...
More information about the sr-dev
mailing list