httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Axel-St├ęphane SMORGRAV <Axel-Stephane.SMORG...@europe.adp.com>
Subject RE: [users@httpd] Question about mod_cache
Date Mon, 14 Nov 2005 08:01:00 GMT
Since you just restarted the server, the in-memory cache is empty and none of the responses
are cached. The cache_in filter is what puts the response in cache. The cache_out filter is
what serves responses from cache.

I would suggest that you use disk_cache only to start with, until you get things sorted out.
That way you will be able to inspect the contents of the cache on your file system and thereby
ascertain that documents are indeed cached.

I am not sure how the memory cache works with the prefork MPM. I am curious to know whether
the mem cache is local to each worker process, or whether it is shared among worker processes.

-ascs

-----Original Message-----
From: Matthew R. Hamilton [mailto:matthew.hamilton@sbcglobal.net] 
Sent: Thursday, November 10, 2005 12:12 AM
To: users@httpd.apache.org
Subject: Re: [users@httpd] Question about mod_cache

Josh, I enabled LogLevel debug and below is the output from the error log:

-----------------------------------------------------
[Wed Nov 09 16:27:48 2005] [debug]
/home/gatekeeper/minfrin/rpm/BUILD/httpd-2.0.50/server/mpm/prefork/prefork.c(955):
AcceptMutex: sysvsem (default: sysvsem)
[Wed Nov 09 16:27:59 2005] [debug]
/home/gatekeeper/minfrin/rpm/BUILD/httpd-2.0.50/modules/experimental/mod_cache.c(157):
cache: no cache - add cache_in filter and DECLINE [Wed Nov 09 16:27:59 2005] [debug]
/home/gatekeeper/minfrin/rpm/BUILD/httpd-2.0.50/modules/experimental/mod_cache.c(406):
cache: running CACHE_IN filter
[Wed Nov 09 16:27:59 2005] [debug]
/home/gatekeeper/minfrin/rpm/BUILD/httpd-2.0.50/modules/experimental/mod_cache.c(663):
cache: Caching url: /images/corp04/about_may.gif [Wed Nov 09 16:27:59 2005] [debug]
/home/gatekeeper/minfrin/rpm/BUILD/httpd-2.0.50/modules/experimental/mod_cache.c(705):
cache: Added date header
[Wed Nov 09 16:27:59 2005] [info] mem_cache: Cached url:
www.mayco.com/images/corp04/about_may.gif?
[Wed Nov 09 16:27:59 2005] [debug]
/home/gatekeeper/minfrin/rpm/BUILD/httpd-2.0.50/modules/experimental/mod_cache.c(157):
cache: no cache - add cache_in filter and DECLINE

[Wed Nov 09 16:28:00 2005] [debug]
/home/gatekeeper/minfrin/rpm/BUILD/httpd-2.0.50/modules/experimental/mod_cache.c(157):
cache: no cache - add cache_in filter and DECLINE [Wed Nov 09 16:28:00 2005] [debug]
/home/gatekeeper/minfrin/rpm/BUILD/httpd-2.0.50/modules/experimental/mod_cache.c(406):
cache: running CACHE_IN filter
[Wed Nov 09 16:28:00 2005] [debug]
/home/gatekeeper/minfrin/rpm/BUILD/httpd-2.0.50/modules/experimental/mod_cache.c(663):
cache: Caching url: /images/corp04/home_division_links.gif
[Wed Nov 09 16:28:00 2005] [debug]
/home/gatekeeper/minfrin/rpm/BUILD/httpd-2.0.50/modules/experimental/mod_cache.c(705):
cache: Added date header
[Wed Nov 09 16:28:00 2005] [info] mem_cache: Cached url:
www.mayco.com/images/corp04/home_division_links.gif?

And when the browser requests the images again.  I assume since I see age values in the reply
that these messages are just part of the debug information.
-----------------------------------------------------
[Wed Nov 09 16:29:15 2005] [debug]
/home/gatekeeper/minfrin/rpm/BUILD/httpd-2.0.50/modules/experimental/mod_cache.c(157):
cache: no cache - add cache_in filter and DECLINE [Wed Nov 09 16:29:16 2005] [debug]
/home/gatekeeper/minfrin/rpm/BUILD/httpd-2.0.50/modules/experimental/mod_cache.c(157):
cache: no cache - add cache_in filter and DECLINE [Wed Nov 09 16:29:16 2005] [debug]
/home/gatekeeper/minfrin/rpm/BUILD/httpd-2.0.50/modules/experimental/mod_cache.c(157):
cache: no cache - add cache_in filter and DECLINE [Wed Nov 09 16:29:17 2005] [debug]
/home/gatekeeper/minfrin/rpm/BUILD/httpd-2.0.50/modules/experimental/mod_cache.c(157):
cache: no cache - add cache_in filter and DECLINE [Wed Nov 09 16:29:17 2005] [debug]
/home/gatekeeper/minfrin/rpm/BUILD/httpd-2.0.50/modules/experimental/mod_cache.c(157):
cache: no cache - add cache_in filter and DECLINE [Wed Nov 09 16:29:18 2005] [debug]
/home/gatekeeper/minfrin/rpm/BUILD/httpd-2.0.50/modules/experimental/mod_cache.c(157):
cache: no cache - add cache_in filter and DECLINE [Wed Nov 09 16:29:18 2005] [debug]
/home/gatekeeper/minfrin/rpm/BUILD/httpd-2.0.50/modules/experimental/mod_cache.c(157):
cache: no cache - add cache_in filter and DECLINE [Wed Nov 09 16:29:18 2005] [debug]
/home/gatekeeper/minfrin/rpm/BUILD/httpd-2.0.50/modules/experimental/mod_cache.c(157):
cache: no cache - add cache_in filter and DECLINE [Wed Nov 09 16:29:18 2005] [debug]
/home/gatekeeper/minfrin/rpm/BUILD/httpd-2.0.50/modules/experimental/mod_cache.c(157):
cache: no cache - add cache_in filter and DECLINE [Wed Nov 09 16:29:18 2005] [debug]
/home/gatekeeper/minfrin/rpm/BUILD/httpd-2.0.50/modules/experimental/mod_cache.c(157):
cache: no cache - add cache_in filter and DECLINE
-----------------------------------------------------

>From the access log.  The value for %{Age}o is in between "--> <--".  Is this value
age of the item in the cache?  Also some of the Age values are "_".  Does this mean that they
aren't being cached?


-----------------------------------------------------
--> 42 <---  10.1.192.213 www.mayco.com - [09/Nov/2005:16:32:49 -0600] 
--> "GET
/images/corp04/about_may_over.gif HTTP/1.1" 304 - "http://www.mayco.com/common/index.html"
"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)""xportala=68.93.211.5.1106951324602418;
mdsc=68.93.211.5.1107210091138408; may=10.0.64.53.1109366232194316; mayco=10.1.192.213.1130532590511892"
--> 42 <---  10.1.192.213 www.mayco.com - [09/Nov/2005:16:32:49 -0600] 
--> "GET
/images/corp04/about_may.gif HTTP/1.1" 304 - "http://www.mayco.com/common/index.html" "Mozilla/4.0
(compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)""xportala=68.93.211.5.1106951324602418;
mdsc=68.93.211.5.1107210091138408; may=10.0.64.53.1109366232194316; mayco=10.1.192.213.1130532590511892"
--> 42 <---  10.1.192.213 www.mayco.com - [09/Nov/2005:16:32:50 -0600] 
--> "GET
/images/corp04/about_may_over.gif HTTP/1.1" 304 - "http://www.mayco.com/common/index.html"
"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)""xportala=68.93.211.5.1106951324602418;
mdsc=68.93.211.5.1107210091138408; may=10.0.64.53.1109366232194316; mayco=10.1.192.213.1130532590511892"
--> 43 <---  10.1.192.213 www.mayco.com - [09/Nov/2005:16:32:50 -0600] 
--> "GET
/images/corp04/about_may.gif HTTP/1.1" 304 - "http://www.mayco.com/common/index.html" "Mozilla/4.0
(compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)""xportala=68.93.211.5.1106951324602418;
mdsc=68.93.211.5.1107210091138408; may=10.0.64.53.1109366232194316; mayco=10.1.192.213.1130532590511892"

--> - <---  10.1.192.213 www.mayco.com - [09/Nov/2005:17:10:28 -0600] 
--> "GET
/images/corp04/about_may_over.gif HTTP/1.1" 304 - "http://www.mayco.com/common/index.html"
"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)""xportala=68.93.211.5.1106951324602418;
mdsc=68.93.211.5.1107210091138408; may=10.0.64.53.1109366232194316; mayco=10.1.192.213.1130532590511892"
--> 2301 <---  10.1.192.213 www.mayco.com - [09/Nov/2005:17:10:29 -0600] 
--> "GET
/images/corp04/about_may.gif HTTP/1.1" 304 - "http://www.mayco.com/common/index.html" "Mozilla/4.0
(compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)""xportala=68.93.211.5.1106951324602418;
mdsc=68.93.211.5.1107210091138408; may=10.0.64.53.1109366232194316; mayco=10.1.192.213.1130532590511892"
--> - <---  10.1.192.213 www.mayco.com - [09/Nov/2005:17:10:29 -0600] 
--> "GET
/images/corp04/about_may_over.gif HTTP/1.1" 304 - "http://www.mayco.com/common/index.html"
"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)""xportala=68.93.211.5.1106951324602418;
mdsc=68.93.211.5.1107210091138408; may=10.0.64.53.1109366232194316; mayco=10.1.192.213.1130532590511892"
--> 2302 <---  10.1.192.213 www.mayco.com - [09/Nov/2005:17:10:29 -0600] 
--> "GET
/images/corp04/about_may.gif HTTP/1.1" 304 - "http://www.mayco.com/common/index.html" "Mozilla/4.0
(compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)""xportala=68.93.211.5.1106951324602418;
mdsc=68.93.211.5.1107210091138408; may=10.0.64.53.1109366232194316; mayco=10.1.192.213.1130532590511892"

-----------------------------------------------------


Thanks once again for your help.

Matthew

--- Joshua Slive <jslive@gmail.com> wrote:

> On 11/9/05, Matthew R. Hamilton <matthew.hamilton@sbcglobal.net> wrote:
> 
> > Is there anything out there that will help me verify cache hits and misses?
> 
> I thought I answered that:
> 
> > > Change LogLevel to debug and look in the error log to determine if 
> > > mod_cache is active.  (You can also log the "Age" HTTP Response 
> > > header in the access log to see what responses are cached).
> 
> When I use mod_cache, I add %{Age}o to my logformat.  Any request with 
> the Age header has been served from the cache.
> 
> Joshua.
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 
> 


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message