Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/erikdubbelboer/phpRedisAdmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'index.php')
-rw-r--r--index.php6
1 files changed, 2 insertions, 4 deletions
diff --git a/index.php b/index.php
index d142f99..61323f4 100644
--- a/index.php
+++ b/index.php
@@ -71,13 +71,11 @@ if($redis) {
break;
case 'set':
- // This is currently the only way to do this, this can be slow since we need to retrieve all keys
- $len = count($redis->sMembers($fullkey));
+ $len = count($redis->sCard($fullkey));
break;
case 'zset':
- // This is currently the only way to do this, this can be slow since we need to retrieve all keys
- $len = count($redis->zRange($fullkey, 0, -1));
+ $len = count($redis->zCard($fullkey));
break;
}
}