2.1.1 (2023-03-20) - Update setex to set, add TTL to stats

This commit is contained in:
Daniel Mason 2023-03-20 09:26:45 +13:00
parent 679394eb5f
commit 94cae8d271
5 changed files with 54 additions and 17 deletions

View file

@ -14,7 +14,12 @@ class RedisTest extends TestCase
{
public function testRedisGetSet()
{
$this->redis->setex("testKey", 3600, 24);
$this->redis->set(
'testKey',
24,
['ex' => time() + 3600],
);
$val = $this->redis->get("testKey");
$this->assertEquals(24, $val);
}