-
Notifications
You must be signed in to change notification settings - Fork 1
/
dashboard.block.staticcache.php
44 lines (39 loc) · 1.61 KB
/
dashboard.block.staticcache.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<ul class="items">
<li class="item clear">
<span class="pct80"><?php _e('Cache Expiry' ); ?></span><span class="comments pct20"><?php echo $content->static_cache_expire; ?></span>
</li>
<li class="item clear">
<span class="pct80"><?php _e('Average page generation time' ); ?></span><span class="comments pct20"><?php echo $content->static_cache_average; ?> sec.</span>
</li>
<li class="item clear">
<span class="pct80"><?php _e( 'Total number of pages cached' ); ?></span><span class="comments pct20"><?php echo $content->static_cache_pages; ?></span>
</li>
<li class="item clear">
<span class="pct80"><?php _e( 'Hits' ); ?></span><span class="comments pct20"><?php echo $content->static_cache_hits; ?> (<?php echo $content->static_cache_hits_pct; ?>%)</span>
</li>
<li class="item clear">
<span class="pct80"><?php _e( 'Misses' ); ?></span><span class="comments pct20"><?php echo $content->static_cache_misses; ?> (<?php echo $content->static_cache_misses_pct; ?>%)</span>
</li>
<li class="item clear">
<script type="text/javascript">
/* <![CDATA[ */
function clearStaticCache() {
var url = '<?php URL::out('auth_ajax', 'context=clear_staticcache'); ?>';
spinner.start();
$.get(
url,
function( json ) {
spinner.stop();
humanMsg.displayMsg( json );
$('.static-cache-module .item .pct20').each(function() {
$(this).html('0');
});
},
'json'
);
}
/* ]]> */
</script>
<span class="pct100"><a class="link_as_button" href="javascript:clearStaticCache();"><?php _e( 'Clear Cache Data' ); ?></a></span>
</li>
</ul>