From: Igor Galić Date: Thu, 22 Apr 2010 12:07:44 +0000 (+0000) Subject: Adding an cache hit/miss example, regarding PR#48241 X-Git-Tag: 2.3.6~172 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=08a37e75280f51712b27c5d8023f99dcea27e5a2;p=apache Adding an cache hit/miss example, regarding PR#48241 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@936805 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/logs.html.en b/docs/manual/logs.html.en index 3fe64e2539..9711bdf680 100644 --- a/docs/manual/logs.html.en +++ b/docs/manual/logs.html.en @@ -428,6 +428,21 @@ CustomLog logs/non_english_log common env=!english

+

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:

+ +

+ SetEnv CACHE_MISS 1
+ LogFormat "%h %l %u %t "%r " %>s %b %{CACHE_MISS}e" common-cache + CustomLog logs/access_log common-cache +

+ +

mod_cache will run before + mod_env and when successfull will deliver the + content without it. In that case a cache hit will log + -, while a cache miss will log 1.

+

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 diff --git a/docs/manual/logs.xml b/docs/manual/logs.xml index 677ab847a6..d85e966c18 100644 --- a/docs/manual/logs.xml +++ b/docs/manual/logs.xml @@ -458,6 +458,21 @@ CustomLog logs/non_english_log common env=!english +

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:

+ + + SetEnv CACHE_MISS 1
+ LogFormat "%h %l %u %t "%r " %>s %b %{CACHE_MISS}e" common-cache + CustomLog logs/access_log common-cache +
+ +

mod_cache will run before + mod_env and when successfull will deliver the + content without it. In that case a cache hit will log + -, while a cache miss will log 1.

+

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