Skip to content

Commit 8462cac

Browse files
committed
Fix sort_url for apc key.
1 parent 0da29a6 commit 8462cac

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

cache.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,15 @@ function apc_mem( $key ) {
6262

6363
}
6464

65+
function apc_ref() {
66+
global $apc;
67+
68+
if( !empty( $apc['cache']['cache_list'] ) )
69+
return current($apc['cache']['cache_list']);
70+
71+
return array();
72+
}
73+
6574
function human_size( $s ) {
6675
$size = 'B';
6776
$sizes = array( 'KB', 'MB', 'GB' );
@@ -292,7 +301,7 @@ function sort_list(&$list) {
292301
<table>
293302
<thead>
294303
<tr>
295-
<th><a href="<?=sort_url(has_key('key', 'info'))?>">Key</a></th>
304+
<th><a href="<?=sort_url(has_key(apc_ref(), 'key', 'info'))?>">Key</a></th>
296305
<th><a href="<?=sort_url('nhits')?>">Hits</a></th>
297306
<th><a href="<?=sort_url('mem_size')?>">Size</a></th>
298307
<th><a href="<?=sort_url('ttl')?>">TTL</a></th>

0 commit comments

Comments
 (0)