| 133 | } |
| 134 | |
| 135 | bool RedisClient::Exists(const std::string& key) |
| 136 | { |
| 137 | ScopedRedisReply reply(Command("EXISTS %s", key.c_str())); |
| 138 | if (reply.IsNull() || reply->type!=REDIS_REPLY_INTEGER || reply->integer==0) return false; |
| 139 | return true; |
| 140 | } |
| 141 | |
| 142 | bool RedisClient::Type(const std::string& key, string& type) |
| 143 | { |