Skip to content

Commit ae53e36

Browse files
committed
Don't mark items with TTL=0 as expired, because they never expire
1 parent ea85892 commit ae53e36

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cache.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,8 @@ function sort_list(&$list) {
286286

287287
<tbody>
288288
<?php foreach( sort_list($apc['cache']['cache_list']) as $item ):
289-
if( !preg_match(get_selector(), $item['key']) || ( !isset( $_GET['apc_show_expired'] ) && $item['mtime'] + $item['ttl'] < time() ) ) continue;?>
289+
$expired = !isset( $_GET['apc_show_expired'] ) && $item['ttl'] > 0 && $item['mtime'] + $item['ttl'] < time();
290+
if( !preg_match(get_selector(), $item['key']) || $expired ) continue;?>
290291
<tr>
291292
<td><?=$item['key']?></td>
292293
<td><?=$item['nhits']?></td>

0 commit comments

Comments
 (0)