debug ttl

This commit is contained in:
Dennis Eichhorn 2019-12-08 11:47:18 +01:00
parent 5d220b1430
commit da10692f57
2 changed files with 2 additions and 1 deletions

View File

@ -107,6 +107,7 @@ class RedisCache extends ConnectionAbstract
if ($expire > 0) {
$this->con->setEx($key, $expire, $this->build($value));
var_dump($this->con->ttl($key));
}
$this->con->set($key, $this->build($value));

View File

@ -227,7 +227,7 @@ class RedisCacheTest extends \PHPUnit\Framework\TestCase
{
$this->cache->set('key2', 'testVal2', 1);
self::assertEquals('testVal2', $this->cache->get('key2', 1));
\sleep(5);
\sleep(2);
self::assertNull($this->cache->get('key2', 1));
}