2
2
if (!extension_loaded ('apcu ' )) {
3
3
function apcu_cache_info ($ limited = false ) { return apc_cache_info ('user ' , $ limited ); }
4
4
function apcu_sma_info ($ limited = false ) { return apc_sma_info ($ limited ); }
5
- function apcu_fetch ($ key , &$ success ) { return apc_fetch ($ key , $ success ); }
5
+ function apcu_fetch ($ key , &$ success = null ) { return apc_fetch ($ key , $ success ); }
6
6
function apcu_delete ($ key ) { return apc_delete ($ key ); }
7
7
class ApcuIterator extends ApcIterator {}
8
8
}
@@ -301,7 +301,7 @@ function sort_list(&$list) {
301
301
<?php if ( isset ( $ _GET ['action ' ] ) && $ _GET ['action ' ] == 'apcu_view ' ): ?>
302
302
<div>
303
303
<h3>Value for <?= htmlentities ('" ' .$ _GET ['selector ' ].'" ' )?> </h3>
304
- <pre><?php var_dump ( apcu_fetch (urldecode ($ _GET ['selector ' ])) ); ?> </pre>
304
+ <pre><?= htmlentities ( var_export ( apcu_fetch (urldecode ($ _GET ['selector ' ]))), true ); ?> </pre>
305
305
</div>
306
306
<?php endif ; ?>
307
307
<?php if ( isset ( $ _GET ['action ' ] ) && $ _GET ['action ' ] == 'apcu_select ' ): ?>
@@ -311,7 +311,7 @@ function sort_list(&$list) {
311
311
<thead>
312
312
<tr>
313
313
<th><a href="<?= sort_url (has_key (apcu_ref (), 'key ' , 'info ' ))?> ">Key</a></th>
314
- <th><a href="<?= sort_url ('nhits ' )?> ">Hits</a></th>
314
+ <th><a href="<?= sort_url (has_key ( apcu_ref (), 'nhits ' , ' num_hits ' ) )?> ">Hits</a></th>
315
315
<th><a href="<?= sort_url ('mem_size ' )?> ">Size</a></th>
316
316
<th><a href="<?= sort_url ('ttl ' )?> ">TTL</a></th>
317
317
<th>Expires</th>
@@ -327,7 +327,7 @@ function sort_list(&$list) {
327
327
if ( !preg_match (get_selector (), get_key ($ item , 'key ' , 'info ' )) || $ expired ) continue ;?>
328
328
<tr>
329
329
<td><?= get_key ($ item , 'key ' , 'info ' )?> </td>
330
- <td><?= $ item[ 'nhits ' ] ?> </td>
330
+ <td><?= get_key ( $ item, 'nhits ' , ' num_hits ' ) ?> </td>
331
331
<td><?= human_size ($ item ['mem_size ' ])?> </td>
332
332
<td><?= $ item ['ttl ' ]?> </td>
333
333
<td><?= date ('Y-m-d H:i ' , get_key ($ item , 'mtime ' , 'modification_time ' ) + $ item ['ttl ' ] )?> </td>
0 commit comments