Tap::cmp_ok($cache->get(array($k)), '===', array(), 'after setting the key to null, key is deleted');
Tap::is($cache->set($k, $v = '0'), TRUE, 'setting a key to zero returns true');
Tap::cmp_ok($cache->get($k), '===', $v, 'after setting the key to 0, get returns zero value');
Tap::cmp_ok($cache->get(array($k)), '===', array($k => $v), 'multi-get returns the key with zero value');
Tap::ok($cache->set($k, 1, $ttl = 3600 * 24 * 30), 'setting with a huge timeout');
Tap::cmp_ok(strval($cache->get($k)), '===', '1', 'get returns correct value');
$incr = 1000000;
Tap::ok($cache->increment($k, $incr), 'incrementing with a large number');
Tap::cmp_ok(strval($cache->get($k)), '===', strval($incr + 1), 'get returns correct value');
Tap::ok($cache->decrement($k, $incr), 'decrementing with a large number');
Tap::cmp_ok(intval($cache->get($k)), '===', 1, 'get returns correct value');
$huge_number = 9.223372036854776E+18;
if (!is_int($huge_number)) {
    $huge_number = 2147483646;
}
Tap::Debug("testing with {$huge_number}");
Tap::ok($cache->set($k, $v = $huge_number), 'setting a huge number');
Tap::cmp_ok(strval($cache->get($k)), '===', strval($v), 'get returns correct value');
$v = $v + 1;
Tap::cmp_ok(strval($cache->increment($k, 1)), '===', strval($v), 'increment a huge number by 1');
Tap::cmp_ok(strval($cache->get($k)), '===', strval($v), 'get returns correct value');
$cache->set($k, $v);
$v = $v - 1;
Tap::cmp_ok(strval($cache->decrement($k, 1)), '===', strval($v), 'decrement a huge number by 1');
Tap::cmp_ok(strval($cache->get($k)), '===', strval($v), 'get returns correct value');
$k = 'gaia/cache/test/' . microtime(TRUE) . '/' . mt_rand(1, 10000);
$v = '我能吞下玻璃而不傷身體';
Tap::ok($cache->set($k, $v), 'setting a string with utf-8 chars in it');
Tap::cmp_ok(strval($cache->get($k)), '===', $v, 'get returns correct value');
Tap::ok($cache->delete($k), 'deleting the key');
Tap::cmp_ok($cache->get($k), '===', NULL, 'after deleting, get returns NULL');