From 78a639a4c2f30bd2cfcc1d27371aa8839f39e238 Mon Sep 17 00:00:00 2001 From: zsx Date: Fri, 23 Jan 2015 11:00:14 +0800 Subject: [PATCH] modify some redis samples --- lib_acl_cpp/samples/redis/redis_key/redis_key.cpp | 2 +- lib_acl_cpp/samples/redis/redis_manager/redis_manager.cpp | 2 +- lib_acl_cpp/samples/redis/redis_pool/redis_pool.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib_acl_cpp/samples/redis/redis_key/redis_key.cpp b/lib_acl_cpp/samples/redis/redis_key/redis_key.cpp index eb58e53ee..d27bcf09c 100644 --- a/lib_acl_cpp/samples/redis/redis_key/redis_key.cpp +++ b/lib_acl_cpp/samples/redis/redis_key/redis_key.cpp @@ -29,7 +29,7 @@ static void test_expire(acl::redis_key& option, int n) { key.format("%s_%d", __keypre.c_str(), i); option.reset(); - if (option.set_expire(key.c_str(), 100) < 0) + if (option.expire(key.c_str(), 100) < 0) { printf("expire key: %s error\r\n", key.c_str()); break; diff --git a/lib_acl_cpp/samples/redis/redis_manager/redis_manager.cpp b/lib_acl_cpp/samples/redis/redis_manager/redis_manager.cpp index 459795bce..7fcb20cad 100644 --- a/lib_acl_cpp/samples/redis/redis_manager/redis_manager.cpp +++ b/lib_acl_cpp/samples/redis/redis_manager/redis_manager.cpp @@ -25,7 +25,7 @@ static bool test_expire(acl::redis_key& option, int i) key.format("%s_%d", __keypre.c_str(), i); option.reset(); - if (option.set_expire(key.c_str(), 100) < 0) + if (option.expire(key.c_str(), 100) < 0) { printf("expire key: %s error\r\n", key.c_str()); return false; diff --git a/lib_acl_cpp/samples/redis/redis_pool/redis_pool.cpp b/lib_acl_cpp/samples/redis/redis_pool/redis_pool.cpp index 57a0a36dd..6009af9ce 100644 --- a/lib_acl_cpp/samples/redis/redis_pool/redis_pool.cpp +++ b/lib_acl_cpp/samples/redis/redis_pool/redis_pool.cpp @@ -25,7 +25,7 @@ static bool test_expire(acl::redis_key& option, int i) key.format("%s_%d", __keypre.c_str(), i); option.reset(); - if (option.set_expire(key.c_str(), 100) < 0) + if (option.expire(key.c_str(), 100) < 0) { printf("expire key: %s error\r\n", key.c_str()); return false;