Skip to content

Commit 2cfb900

Browse files
Merge pull request #148 from vjuradouson/fix/avoid-expire-lifetime-null
Avoid expiration life time when $specificLifetime has not passed in f…
2 parents 559434b + 9d147cc commit 2cfb900

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Cm/Cache/Backend/Redis.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,8 @@ public function save($data, $id, $tags = array(), $specificLifetime = false)
543543
else
544544
$tags = array_flip(array_flip($tags));
545545

546-
$lifetime = (int)$this->_getAutoExpiringLifetime($this->getLifetime($specificLifetime), $id);
546+
$lifetime = $this->_getAutoExpiringLifetime($this->getLifetime($specificLifetime), $id);
547+
$lifetime = $lifetime === null ? $lifetime : (int) $lifetime;
547548

548549
if ($this->_useLua) {
549550
$sArgs = array(

0 commit comments

Comments
 (0)