Skip to content

Commit

Permalink
Merge pull request #148 from vjuradouson/fix/avoid-expire-lifetime-null
Browse files Browse the repository at this point in the history
Avoid expiration life time when $specificLifetime has not passed in f…
  • Loading branch information
colinmollenhour authored Nov 27, 2019
2 parents 559434b + 9d147cc commit 2cfb900
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Cm/Cache/Backend/Redis.php
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,8 @@ public function save($data, $id, $tags = array(), $specificLifetime = false)
else
$tags = array_flip(array_flip($tags));

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

if ($this->_useLua) {
$sArgs = array(
Expand Down

2 comments on commit 2cfb900

@it-can
Copy link

@it-can it-can commented on 2cfb900 Dec 8, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@colinmollenhour can you tag a new release?

@colinmollenhour
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@colinmollenhour can you tag a new release?

Tagged 1.13.0

Please sign in to comment.