|
@@ -10,7 +10,13 @@ Daniel-Constantin Mierla
|
|
|
|
|
|
<[email protected]>
|
|
<[email protected]>
|
|
|
|
|
|
- Copyright © 2011 asipto.com
|
|
|
|
|
|
+Vicente Hernando
|
|
|
|
+
|
|
|
|
+ <[email protected]>
|
|
|
|
+
|
|
|
|
+ Copyright © 2011 asipto.com
|
|
|
|
+
|
|
|
|
+ Copyright © 2012 www.systemonenoc.com
|
|
__________________________________________________________________
|
|
__________________________________________________________________
|
|
|
|
|
|
Table of Contents
|
|
Table of Contents
|
|
@@ -30,11 +36,13 @@ Daniel-Constantin Mierla
|
|
4. Functions
|
|
4. Functions
|
|
|
|
|
|
4.1. redis_cmd(srvname, command, replyid)
|
|
4.1. redis_cmd(srvname, command, replyid)
|
|
|
|
+ 4.2. redis_free(replyid)
|
|
|
|
|
|
List of Examples
|
|
List of Examples
|
|
|
|
|
|
1.1. Set server parameter
|
|
1.1. Set server parameter
|
|
1.2. redis_cmd usage
|
|
1.2. redis_cmd usage
|
|
|
|
+ 1.3. redis_free usage
|
|
|
|
|
|
Chapter 1. Admin Guide
|
|
Chapter 1. Admin Guide
|
|
|
|
|
|
@@ -53,6 +61,7 @@ Chapter 1. Admin Guide
|
|
4. Functions
|
|
4. Functions
|
|
|
|
|
|
4.1. redis_cmd(srvname, command, replyid)
|
|
4.1. redis_cmd(srvname, command, replyid)
|
|
|
|
+ 4.2. redis_free(replyid)
|
|
|
|
|
|
1. Overview
|
|
1. Overview
|
|
|
|
|
|
@@ -107,8 +116,9 @@ modparam("ndb_redis", "server", "name=srvX;addr=127.0.0.2;port=6379;db=4")
|
|
4. Functions
|
|
4. Functions
|
|
|
|
|
|
4.1. redis_cmd(srvname, command, replyid)
|
|
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
|
|
Send a command to REDIS server identified by srvname. The reply will be
|
|
stored in a local continer identified by replyid. All the parameters
|
|
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");
|
|
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");
|
|
|
|
+...
|