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

Function test_ttl

lib_acl_cpp/samples/redis/redis_pool/redis_pool.cpp:56–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54}
55
56static bool test_ttl(acl::redis_key& redis, int i)
57{
58 acl::string key;
59 int ttl;
60
61 key.format("%s_%d", __keypre.c_str(), i);
62 redis.clear();
63 if ((ttl = redis.ttl(key.c_str())) < 0)
64 {
65 printf("get ttl key: %s error\r\n", key.c_str());
66 return false;
67 }
68 else if (i < 10)
69 printf("ttl ok, key: %s, ttl: %d\r\n", key.c_str(), ttl);
70 return true;
71}
72
73static bool test_exists(acl::redis_key& redis, int i)
74{

Callers 1

runMethod · 0.70

Calls 4

ttlMethod · 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…