Last active
November 28, 2016 05:56
-
-
Save maiha/549599d731875e04dcb3c59f6824ccda to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
127.0.0.1:6379> zadd zset 100 a | |
(integer) 1 | |
127.0.0.1:6379> zadd zset 200 b | |
(integer) 1 | |
127.0.0.1:6379> eval "return {redis.call('ZSCORE',KEYS[1],KEYS[2]),redis.call('ZRANK',KEYS[1],KEYS[2])}" 2 zset b | |
1) "200" | |
2) (integer) 1 | |
127.0.0.1:6379> script load "return {redis.call('ZSCORE',KEYS[1],KEYS[2]),redis.call('ZRANK',KEYS[1],KEYS[2])}" | |
"b6b9e64ed4cc349469e0f24c49469c6d6fcdfc5a" | |
127.0.0.1:6379> evalsha "b6b9e64ed4cc349469e0f24c49469c6d6fcdfc5a" 2 zset b | |
1) "200" | |
2) (integer) 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment