MCPcopy Create free account
hub / github.com/acl-dev/acl / test_expire

Function test_expire

lib_acl_cpp/samples/redis/redis_pool/redis_pool.cpp:40–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38}
39
40static 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
56static bool test_ttl(acl::redis_key& redis, int i)
57{

Callers 1

runMethod · 0.70

Calls 4

expireMethod · 0.80
formatMethod · 0.45
c_strMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…