From 74bbb1e63039fbe9da8a35fa834ec1b127e62eba Mon Sep 17 00:00:00 2001 From: Chris Fasel Date: Mon, 14 Nov 2016 19:40:33 +0100 Subject: [PATCH] Shorten TTL handling for redis --- base.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/base.php b/base.php index 68165d0e..1d35d441 100644 --- a/base.php +++ b/base.php @@ -2417,11 +2417,7 @@ function set($key,$val,$ttl=0) { case 'apcu': return apc_store($ndx,$data,$ttl); case 'redis': - if($ttl > 0) { - return $this->ref->set($ndx,$data,array('ex'=>$ttl)); - } else { - return $this->ref->set($ndx,$data); - } + return $this->ref->set($ndx,$data, $ttl ? ['ex'=>$ttl] : []); case 'memcache': return memcache_set($this->ref,$ndx,$data,0,$ttl); case 'wincache':