Esempio n. 1
0
static bool test_exists(acl::redis_key& redis, int n)
{
	acl::string key;

	for (int i = 0; i < n; i++)
	{
		key.format("%s_%d", __keypre.c_str(), i);
		redis.clear();
		if (redis.exists(key.c_str()) == false)
			printf("no exists key: %s\r\n", key.c_str());
		else
			printf("exists key: %s\r\n", key.c_str());
	}

	return true;
}
Esempio n. 2
0
static bool test_exists(acl::redis_key& redis, int i)
{
	acl::string key;

	key.format("%s_%d", __keypre.c_str(), i);
	redis.clear();
	if (redis.exists(key.c_str()) == false)
	{
		if (i < 10)
			printf("no exists key: %s\r\n", key.c_str());
	}
	else
	{
		if (i < 10)
			printf("exists key: %s\r\n", key.c_str());
	}
	return true;
}