| 77 | } |
| 78 | |
| 79 | static bool test_append(acl::redis_string& redis, int n) |
| 80 | { |
| 81 | acl::string key; |
| 82 | acl::string value; |
| 83 | |
| 84 | for (int i = 0; i < n; i++) |
| 85 | { |
| 86 | key.format("%s_%d", __keypre.c_str(), i); |
| 87 | value.format("_append_%d", i); |
| 88 | |
| 89 | redis.clear(); |
| 90 | if (redis.append(key.c_str(), value.c_str()) < 0) |
| 91 | { |
| 92 | printf("append key: %s\r\n", key.c_str()); |
| 93 | return false; |
| 94 | } |
| 95 | } |
| 96 | |
| 97 | return true; |
| 98 | } |
| 99 | |
| 100 | static bool test_get(acl::redis_string& redis, int n) |
| 101 | { |