Fork 0

closes #8, simple docs for admin pages

git-svn-id: svn://svn.lighttpd.net/xcache/trunk@60 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
Xuefer 17 years ago
parent a712913101
commit 7e0b3b0ea8

@ -0,0 +1,69 @@
$charset = "UTF-8";
if (file_exists("./config.php")) {
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Language" content="en-us" />
echo <<<HEAD
<meta http-equiv="Content-Type" content="text/html; charset=$charset" />
<script type="text/javascript" src="tablesort.js" charset="$charset"></script>
<link rel="stylesheet" type="text/css" href="xcache.css" />
<title>XCache Administration Help</title>
function toggle(o)
o.style.display = o.style.display != 'block' ? 'block' : 'none';
<h1>XCache Administration Help</h1>
<a href="javascript:" onclick="toggle(document.getElementById('help'));return false" style="display:block; float: right">Help</a>
<div id1="help">
<h2>Cache Legends</h2>
<b>Slots: </b>Number of hash slots. the setting from your php.ini
<b>Size: </b>Cache Size, Size of the cache (or cache chunk), in bytes
<b>Avail: </b>Available Memory, free memory in bytes of this cache
<b>Used: </b>Used Percent, A bar shows how much memory used in percent
<b>Clear: </b>Clear Button, Press the button to clean this cache
<b>Compiling: </b>Compiling flag, "yes" if the cache is busy compiling php script
<b>Hits: </b>Cache Hits, hit=a var/php is loaded from this cache
<b>Misses: </b>Cache Misses, miss=a var/php is requested but not in the cache
<b>CLogs: </b>Compiling Clogs, clog=compiling is needed but avoided to wait(be blocked)
for the cache busy compiling
<b>OOMs: </b>Out Of Memory, how many times a new item should be stored but there isn't
enough memory in the cache, think of increasing the xcache.size or xcache.var_size
<b>Protected: </b>Whether readonly_protection is available and enable on this cache
<b>Cached: </b>Number of entries stored in this cache
<b>Deleted: </b>Number of entries is pending in delete list (expired but referenced)
<b>Free Blocks:</b>Free blocks list in the specified cache
<h2>List Legends</h2>
<b>entry: </b>The entry name or filename
<b>Hits: </b>Times this entry is hit (loaded from this cache)
<b>Refcount: </b>Reference count this entry is holded by a php request
<b>Size: </b>Size in bytes of this entry in the cache
<b>SrcSize: </b>Size of the source file
<b>Modify: </b>Last modified time of the source file
<b>device: </b>device number of the source file
<b>inode: </b>inode number of the source file
<b>Access: </b>Last access time of the cached entry
<b>Create: </b>The time when this entry is stored
See also: <a href="http://trac.lighttpd.net/xcache/wiki/PhpIni">setting php.ini for XCache</a> in the <a href="http://trac.lighttpd.net/xcache/">XCache wiki</a>

@ -14,3 +14,4 @@ form {margin: 0; padding: 0}
.switcher, h1 { text-align: center; display: block; }
.switcher * { color: blue; }
.switcher a.active { font-weight: bold; font-size: 130%; color: black; }
#help { display: block; float: right; }

@ -63,12 +63,12 @@ function age($time)
static $seconds = array(1, 60, 3600, 86400, 604800, 2678400, 31536000);
static $name = array('sec', 'min', 'hr', 'day', 'week', 'month', 'year');
static $name = array('s', 'm', 'h', 'd', 'w', 'M', 'Y');
for ($i = 6; $i >= 0; $i --) {
if ($delta >= $seconds[$i]) {
$ret = (int) ($delta / $seconds[$i]);
return $ret . ' ' . $name[$i] . ($ret > 1 ? 's' : '');
return $ret . ' ' . $name[$i];

@ -15,11 +15,13 @@ HEAD;
<h1>XCache Administration</h1>
<a href="help.php" target="_blank" id="help">Help &raquo;</a>
<span class="switcher"><?php echo switcher("type", $types); ?></span>
$a = new Cycle('class="col1"', 'class="col2"');
$b = new Cycle('class="col1"', 'class="col2"');
<table cellspacing="0" cellpadding="4" class="cycles">
<col />
<col align="right" />
@ -46,12 +48,11 @@ $b = new Cycle('class="col1"', 'class="col2"');
$numkeys = explode(',', 'slots,size,avail,hits,misses,clogs,ooms,cached,deleted');
@ -86,15 +87,14 @@ $b = new Cycle('class="col1"', 'class="col2"');
<?php } ?>
Free Blocks:
foreach ($cacheinfos as $i => $ci) {