You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I discovered this issue in a project of ours that is using an ancient version of the original Zend_* stuff (before zf1-future existed), and it looks like it carried all the way over to today without being caught/fixed.
The problem is with how this method is called in the save method:
It's called with the default argument for $maxLifetime, which is null. The problem is that _getFastLifetime will always return null when $maxLifetime is null. This is because, if ($maxLifetime >= 0 && $fastLifetime > $maxLifetime) will always evaluate to true when $maxLifetime is null, and will therefore return $maxLifetime (null).
So the fast cache values are always being inserted with no lifetime/TTL and will never expire.
The text was updated successfully, but these errors were encountered:
Link:
zf1-future/library/Zend/Cache/Backend/TwoLevels.php
Line 520 in b87c150
I discovered this issue in a project of ours that is using an ancient version of the original Zend_* stuff (before zf1-future existed), and it looks like it carried all the way over to today without being caught/fixed.
The problem is with how this method is called in the
save
method:zf1-future/library/Zend/Cache/Backend/TwoLevels.php
Line 206 in b87c150
It's called with the default argument for
$maxLifetime
, which isnull
. The problem is that_getFastLifetime
will always returnnull
when$maxLifetime
isnull
. This is because,if ($maxLifetime >= 0 && $fastLifetime > $maxLifetime)
will always evaluate to true when$maxLifetime
isnull
, and will therefore return$maxLifetime
(null
).So the fast cache values are always being inserted with no lifetime/TTL and will never expire.
The text was updated successfully, but these errors were encountered: