From 7e0b3b0ea838ea951183158d9eb21482dd511485 Mon Sep 17 00:00:00 2001 From: Xuefer Date: Sat, 3 Jun 2006 04:20:18 +0000 Subject: [PATCH] closes #8, simple docs for admin pages git-svn-id: svn://svn.lighttpd.net/xcache/trunk@60 c26eb9a1-5813-0410-bd6c-c2e55f420ca7 --- admin/help.php | 69 ++++++++++++++++++++++++++++++++++++++++++++ admin/xcache.css | 1 + admin/xcache.php | 4 +-- admin/xcache.tpl.php | 8 ++--- 4 files changed, 76 insertions(+), 6 deletions(-) create mode 100644 admin/help.php diff --git a/admin/help.php b/admin/help.php new file mode 100644 index 0000000..5145b8b --- /dev/null +++ b/admin/help.php @@ -0,0 +1,69 @@ + + + + + + + +HEAD; +?> + + + XCache Administration Help + + + + +

XCache Administration Help

+Help +
+

Cache Legends

+
+Slots:      Number of hash slots. the setting from your php.ini
+Size:       Cache Size, Size of the cache (or cache chunk), in bytes
+Avail:      Available Memory, free memory in bytes of this cache
+Used:       Used Percent, A bar shows how much memory used in percent
+Clear:      Clear Button, Press the button to clean this cache
+Compiling:  Compiling flag, "yes" if the cache is busy compiling php script
+Hits:       Cache Hits, hit=a var/php is loaded from this cache
+Misses:     Cache Misses, miss=a var/php is requested but not in the cache
+CLogs:      Compiling Clogs, clog=compiling is needed but avoided to wait(be blocked)
+            for the cache busy compiling
+OOMs:       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
+Protected:  Whether readonly_protection is available and enable on this cache
+Cached:     Number of entries stored in this cache
+Deleted:    Number of entries is pending in delete list (expired but referenced)
+Free Blocks:Free blocks list in the specified cache
+
+ +

List Legends

+
+entry:      The entry name or filename
+Hits:       Times this entry is hit (loaded from this cache)
+Refcount:   Reference count this entry is holded by a php request
+Size:       Size in bytes of this entry in the cache
+SrcSize:    Size of the source file
+Modify:     Last modified time of the source file
+device:     device number of the source file
+inode:      inode number of the source file
+Access:     Last access time of the cached entry
+Create:     The time when this entry is stored
+
+
+ +See also: setting php.ini for XCache in the XCache wiki + + diff --git a/admin/xcache.css b/admin/xcache.css index 7de1f14..acd2ca3 100644 --- a/admin/xcache.css +++ b/admin/xcache.css @@ -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; } diff --git a/admin/xcache.php b/admin/xcache.php index 78a9f68..6282689 100644 --- a/admin/xcache.php +++ b/admin/xcache.php @@ -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]; } } } diff --git a/admin/xcache.tpl.php b/admin/xcache.tpl.php index face668..e850f2e 100644 --- a/admin/xcache.tpl.php +++ b/admin/xcache.tpl.php @@ -15,11 +15,13 @@ HEAD;

XCache Administration

+Help » +Caches: @@ -46,12 +48,11 @@ $b = new Cycle('class="col1"', 'class="col2"'); - + - {$ci['can_readonly']} -
Compiling Hits MissesCLogsClogs OOMs Protected Cached DeletedBlocks
{$ci['cached']} {$ci['deleted']} EOS; $b->reset(); ?> -
+Free Blocks: $ci) { $b->reset();