You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ig...@apache.org on 2010/04/22 14:07:45 UTC
svn commit: r936805 - in /httpd/httpd/trunk/docs/manual: logs.html.en
logs.xml
Author: igalic
Date: Thu Apr 22 12:07:44 2010
New Revision: 936805
URL: http://svn.apache.org/viewvc?rev=936805&view=rev
Log:
Adding an cache hit/miss example, regarding PR#48241
Modified:
httpd/httpd/trunk/docs/manual/logs.html.en
httpd/httpd/trunk/docs/manual/logs.xml
Modified: httpd/httpd/trunk/docs/manual/logs.html.en
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/logs.html.en?rev=936805&r1=936804&r2=936805&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/logs.html.en (original)
+++ httpd/httpd/trunk/docs/manual/logs.html.en Thu Apr 22 12:07:44 2010
@@ -428,6 +428,21 @@
CustomLog logs/non_english_log common env=!english
</code></p></div>
+ <p>In a caching scenario one would want to know about
+ the efficiency of the cache. A very simple method to
+ find this out would be:</p>
+
+ <div class="example"><p><code>
+ SetEnv CACHE_MISS 1<br />
+ LogFormat "%h %l %u %t "%r " %>s %b %{CACHE_MISS}e" common-cache
+ CustomLog logs/access_log common-cache
+ </code></p></div>
+
+ <p><code class="module"><a href="./mod/mod_cache.html">mod_cache</a></code> will run before
+ <code class="module"><a href="./mod/mod_env.html">mod_env</a></code> and when successfull will deliver the
+ content without it. In that case a cache hit will log
+ <code>-</code>, while a cache miss will log <code>1</code>.</p>
+
<p>Although we have just shown that conditional logging is very
powerful and flexible, it is not the only way to control the
contents of the logs. Log files are more useful when they
Modified: httpd/httpd/trunk/docs/manual/logs.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/logs.xml?rev=936805&r1=936804&r2=936805&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/logs.xml (original)
+++ httpd/httpd/trunk/docs/manual/logs.xml Thu Apr 22 12:07:44 2010
@@ -458,6 +458,21 @@
CustomLog logs/non_english_log common env=!english
</example>
+ <p>In a caching scenario one would want to know about
+ the efficiency of the cache. A very simple method to
+ find this out would be:</p>
+
+ <example>
+ SetEnv CACHE_MISS 1<br />
+ LogFormat "%h %l %u %t "%r " %>s %b %{CACHE_MISS}e" common-cache
+ CustomLog logs/access_log common-cache
+ </example>
+
+ <p><module>mod_cache</module> will run before
+ <module>mod_env</module> and when successfull will deliver the
+ content without it. In that case a cache hit will log
+ <code>-</code>, while a cache miss will log <code>1</code>.</p>
+
<p>Although we have just shown that conditional logging is very
powerful and flexible, it is not the only way to control the
contents of the logs. Log files are more useful when they