| 38 | } |
| 39 | |
| 40 | static bool test_expire(acl::redis_key& redis, int i) |
| 41 | { |
| 42 | acl::string key; |
| 43 | |
| 44 | key.format("%s_%d", __keypre.c_str(), i); |
| 45 | redis.clear(); |
| 46 | if (redis.expire(key.c_str(), 100) < 0) |
| 47 | { |
| 48 | printf("expire key: %s error\r\n", key.c_str()); |
| 49 | return false; |
| 50 | } |
| 51 | else if (i < 10) |
| 52 | printf("expire ok, key: %s\r\n", key.c_str()); |
| 53 | return true; |
| 54 | } |
| 55 | |
| 56 | static bool test_ttl(acl::redis_key& redis, int i) |
| 57 | { |