-
-set (#url.iterations# iterations)
-
-for(i = 1; i <= #url.iterations#; i++) {
- application.redis.set("example:command:benchmark:#i#", i);
-}
-
-
-
- startTime = getTickCount();
- for(i = 1; i <= url.iterations; i++) {
- application.redis.set("example:command:benchmark:#i#", i);
- }
- totalTime = getTickCount() - startTime;
-
-
- set: #url.iterations# commands in #totalTime#ms
- (#Round(url.iterations/totalTime*1000)# reqs/sec)
-
-
-
-
-get (#url.iterations# iterations)
-
-for(i = 1; i <= #url.iterations#; i++) {
- application.redis.get("example:command:benchmark:#i#");
-}
-
-
-
- startTime = getTickCount();
- for(i = 1; i <= url.iterations; i++) {
- application.redis.get("example:command:benchmark:#i#");
- }
- totalTime = getTickCount() - startTime;
-
-
- get: #url.iterations# commands in #totalTime#ms
- (#Round(url.iterations/totalTime*1000)# reqs/sec)
-
-
-
-
-del (#url.iterations# iterations)
-
-for(i = 1; i <= #url.iterations#; i++) {
- application.redis.del("example:command:benchmark:#i#");
-}
-
-
-
- startTime = getTickCount();
- for(i = 1; i <= url.iterations; i++) {
- application.redis.del("example:command:benchmark:#i#");
- }
- totalTime = getTickCount() - startTime;
-
-
- del: #url.iterations# commands in #totalTime#ms
- (#Round(url.iterations/totalTime*1000)# reqs/sec)
-
-
-
-
-
diff --git a/examples/commands/del.cfm b/examples/commands/del.cfm
deleted file mode 100644
index c434a0a..0000000
--- a/examples/commands/del.cfm
+++ /dev/null
@@ -1,68 +0,0 @@
-
-
-
-delete by string
-
-application.redis.set("example:command:del:key1", "foo");
-application.redis.del("example:command:del:key1");
-
-
-application.redis.set("example:command:del:key1", "foo");
-result = application.redis.del("example:command:del:key1");
-
-#result#
-
-
-
-delete by array
-
-stringArray = [];
-application.redis.set("example:command:del:key1", "foo");
-application.redis.set("example:command:del:key2", "bar");
-ArrayAppend(stringArray, "example:command:del:key1");
-ArrayAppend(stringArray, "example:command:del:key2");
-application.redis.del(stringArray);
-
-
-stringArray = [];
-application.redis.set("example:command:del:key1", "foo");
-application.redis.set("example:command:del:key2", "bar");
-ArrayAppend(stringArray, "example:command:del:key1");
-ArrayAppend(stringArray, "example:command:del:key2");
-result = application.redis.del(stringArray);
-
-#result#
-
-
-
-delete by array
-
-stringArray = [];
-application.redis.set("example:command:del:key1", "foo");
-application.redis.set("example:command:del:key2", "bar");
-application.redis.set("example:command:del:key3", "bav");
-application.redis.set("example:command:del:key4", "baz");
-ArrayAppend(stringArray, "example:command:del:key1");
-ArrayAppend(stringArray, "example:command:del:key2");
-ArrayAppend(stringArray, "example:command:del:key3");
-application.redis.del(stringArray);
-
-
-stringArray = [];
-application.redis.set("example:command:del:key1", "foo");
-application.redis.set("example:command:del:key2", "bar");
-application.redis.set("example:command:del:key3", "bav");
-application.redis.set("example:command:del:key4", "baz");
-ArrayAppend(stringArray, "example:command:del:key1");
-ArrayAppend(stringArray, "example:command:del:key2");
-ArrayAppend(stringArray, "example:command:del:key3");
-result = application.redis.del(stringArray);
-
-#result#
-
-
-
-
-
-
-
diff --git a/examples/commands/hdel.cfm b/examples/commands/hdel.cfm
deleted file mode 100644
index a395006..0000000
--- a/examples/commands/hdel.cfm
+++ /dev/null
@@ -1,54 +0,0 @@
-
-
-
-Set hash using hmset
-
-redisKey = "example:command:hdel";
-hashValues = {};
-hashValues["one"] = "uno";
-hashValues["two"] = "dos";
-hashValues["three"] = "tres";
-application.redis.hmset(redisKey, hashValues);
-
-
- redisKey = "example:command:hdel";
- hashValues = {};
- hashValues["one"] = "uno";
- hashValues["two"] = "dos";
- hashValues["three"] = "tres";
- application.redis.hmset(redisKey, hashValues);
-
-
-
-
-Get hash using hgetall
-
-redisKey = "example:command:hdel";
-application.redis.hgetall(redisKey);
-
-
-
-
-
-Delete hash value using hdel
-
-redisKey = "example:command:hdel";
-application.redis.hdel(redisKey, "two");
-
-
-
-
-
-Get hash using hgetall
-
-redisKey = "example:command:hdel";
-application.redis.hgetall(redisKey);
-
-
-
-
-
-
-
-
-
diff --git a/examples/commands/hmset.cfm b/examples/commands/hmset.cfm
deleted file mode 100644
index 8539104..0000000
--- a/examples/commands/hmset.cfm
+++ /dev/null
@@ -1,120 +0,0 @@
-
-
-
-Set hash using hmset
-
-redisKey = "example:command:hmset";
-hashValues = {};
-hashValues["one"] = "uno";
-hashValues["two"] = "dos";
-hashValues["three"] = "tres";
-application.redis.hmset(redisKey, hashValues);
-
-
- redisKey = "example:command:hmset";
- hashValues = {};
- hashValues["one"] = "uno";
- hashValues["two"] = "dos";
- hashValues["three"] = "tres";
- application.redis.hmset(redisKey, hashValues);
-
-
-
-
-
-Get hash using hgetall
-
-application.redis.hgetall(redisKey)
-
-
-
-
-
-Set hash using hmset
-
-redisKey = "example:command:hmset";
-hashValues = {};
-hashValues["one"] = "1";
-hashValues["two"] = "2";
-hashValues["three"] = "3";
-application.redis.hmset(redisKey, hashValues);
-
-
- redisKey = "example:command:hmset";
- hashValues = {};
- hashValues["one"] = "1";
- hashValues["two"] = "2";
- hashValues["three"] = "3";
- application.redis.hmset(redisKey, hashValues);
-
-
-
-
-
-Get hash using hgetall
-
-application.redis.hgetall(redisKey)
-
-
-
-
-
-Set hash using hmset
-
-redisKey = "example:command:hmset";
-hashValues = {};
-hashValues[1] = "one";
-hashValues[2] = "two";
-hashValues[3] = "three";
-application.redis.hmset(redisKey, hashValues);
-
-
- redisKey = "example:command:hmset";
- hashValues = {};
- hashValues[1] = "one";
- hashValues[2] = "two";
- hashValues[3] = "three";
- application.redis.hmset(redisKey, hashValues);
-
-
-
-
-
-Get hash using hgetall
-
-application.redis.hgetall(redisKey)
-
-
-
-
-
-Set hash containing type "Double" values using hmset
-(This will cause an error on Railo)
-
-redisKey = "example:command:hmset";
-hashValues = {};
-hashValues["one"] = 1;
-hashValues["two"] = 2;
-hashValues["three"] = 3;
-application.redis.hmset(redisKey, hashValues);
-
-
-
- redisKey = "example:command:hmset";
- hashValues = {};
- hashValues["one"] = 1;
- hashValues["two"] = 2;
- hashValues["three"] = 3;
- application.redis.hmset(redisKey, hashValues);
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/examples/commands/incr.cfm b/examples/commands/incr.cfm
deleted file mode 100644
index 1209a9a..0000000
--- a/examples/commands/incr.cfm
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
-
-
-incr
-
-application.redis.incr("example:command:incr:keyname")
-#application.redis.incr("example:command:incr:keyname")#
-
-
-
-
-
-
diff --git a/examples/commands/mget.cfm b/examples/commands/mget.cfm
deleted file mode 100644
index 13ece57..0000000
--- a/examples/commands/mget.cfm
+++ /dev/null
@@ -1,55 +0,0 @@
-
-
-
-Set values and retrieve using mget
-
-application.redis.set("example:command:mget:key1", "foo");
-application.redis.set("example:command:mget:key2", "bar");
-application.redis.set("example:command:mget:key3", "bav");
-application.redis.set("example:command:mget:key4", "baz");
-
-keys = [];
-ArrayAppend(keys, "example:command:mget:key1");
-ArrayAppend(keys, "example:command:mget:key2");
-ArrayAppend(keys, "example:command:mget:key3");
-ArrayAppend(keys, "example:command:mget:key4");
-application.redis.mget(keys);
-
-
-application.redis.set("example:command:mget:key1", "foo");
-application.redis.set("example:command:mget:key2", "bar");
-application.redis.set("example:command:mget:key3", "bav");
-application.redis.set("example:command:mget:key4", "baz");
-
-keys = [];
-ArrayAppend(keys, "example:command:mget:key1");
-ArrayAppend(keys, "example:command:mget:key2");
-ArrayAppend(keys, "example:command:mget:key3");
-ArrayAppend(keys, "example:command:mget:key4");
-result = application.redis.mget(keys);
-
-
-
-
-
-Iterate over the results
-
-<cfloop from="1" to="#arrayLen(result)#" index="i">
- <cfif ArrayIsDefined(result, i)>
- <cfoutput>element #i#: #result[i]#</cfoutput><br />
- </cfif>
-</cfloop>
-
-
-
- element #i#: #result[i]#
-
-
-
-
-
-
-
-
-
-
diff --git a/examples/commands/pubsub.cfm b/examples/commands/pubsub.cfm
deleted file mode 100644
index 355d02e..0000000
--- a/examples/commands/pubsub.cfm
+++ /dev/null
@@ -1,58 +0,0 @@
-
-
-
-
-
-
-Subscribe to a channel in the Redis CLI
-
-$ redis-cli
-redis 127.0.0.1:6379> SUBSCRIBE "example:pubsub:test-channel"
-Reading messages... (press Ctrl-C to quit)
-1) "subscribe"
-2) "example:pubsub:test-channel"
-3) (integer) 1
-
-
-
-
-Publish messages to channel using ColdFusion
-
-application.redis.publish("example:pubsub:test-channel", "test message 1");
-application.redis.publish("example:pubsub:test-channel", "test message 2");
-application.redis.publish("example:pubsub:test-channel", "test message 3");
-application.redis.publish("example:pubsub:test-channel", "test message 4");
-
-
-result1 = application.redis.publish("example:pubsub:test-channel", "test message 1");
-result2 = application.redis.publish("example:pubsub:test-channel", "test message 2");
-result3 = application.redis.publish("example:pubsub:test-channel", "test message 3");
-result4 = application.redis.publish("example:pubsub:test-channel", "test message 4");
-
-#result1#
-#result2#
-#result3#
-#result4#
-
-
-
-Expected messages in Redis CLI
-
-1) "message"
-2) "example:pubsub:test-channel"
-3) "test message 1"
-1) "message"
-2) "example:pubsub:test-channel"
-3) "test message 2"
-1) "message"
-2) "example:pubsub:test-channel"
-3) "test message 3"
-1) "message"
-2) "example:pubsub:test-channel"
-3) "test message 4"
-
-
-
-
-
-
diff --git a/examples/commands/set_get.cfm b/examples/commands/set_get.cfm
deleted file mode 100644
index ea54b44..0000000
--- a/examples/commands/set_get.cfm
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
-
-Set value using set
-
-application.redis.set("example:command:get:keyname", "this is the key value")
-
-
-#result#
-
-
-
-Get value using get
-
-application.redis.get("example:command:get:keyname")
-
-
-#result#
-
-
-
-Set value using set
-
-application.redis.set('example:command:get:foo', 'bar')
-
-#application.redis.set('example:command:get:foo', 'bar')#
-
-
-
-Get value using get
-
-application.redis.get('example:command:get:foo')
-
-#application.redis.get('example:command:get:foo')#
-
-
-
-
-
-
-
-
diff --git a/examples/includes/footer.cfm b/examples/includes/footer.cfm
deleted file mode 100644
index 4812d68..0000000
--- a/examples/includes/footer.cfm
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
- [back to cfredis examples]
-
-
-