I have 5 children, so Eric's answer that each process has its own in-memory cache makes sense.
-Tony --------------------------- Manager, IT Operations Format Dynamics, Inc. 303-573-1800x27 abia...@formatdynamics.com http://www.formatdynamics.com -----Original Message----- From: Houser, Rick [mailto:houser.r...@aoins.com] Sent: Monday, February 23, 2009 6:22 AM To: modules-dev@httpd.apache.org; us...@httpd.apache.org Subject: RE: mem_cache and disk_cache acting differently when determine when to cache content? Is this the only child process, or do you have 3+? Thanks, Rick Houser Auto-Owners Insurance Systems Support (517)703-2580 -----Original Message----- From: Anthony J. Biacco [mailto:abia...@formatdynamics.com] Sent: Friday, February 20, 2009 6:12 PM To: us...@httpd.apache.org Cc: modules-dev@httpd.apache.org Subject: RE: mem_cache and disk_cache acting differently when determine when to cache content? I stand corrected, The mem_cache module DOES serve out the cached version, but not until the 6th request of the URL. The disk_cache module serves out the cached version on the 2nd request (as it should). FYI, I'm using the worker mpm. -Tony --------------------------- Manager, IT Operations Format Dynamics, Inc. 303-573-1800x27 abia...@formatdynamics.com http://www.formatdynamics.com -----Original Message----- From: Anthony J. Biacco Sent: Friday, February 20, 2009 4:05 PM To: 'us...@httpd.apache.org' Cc: 'modules-dev@httpd.apache.org' Subject: mem_cache and disk_cache acting differently when determine when to cache content? Hi, I'm serving out dynamic content from apache 2.2.11 that has a query string on it. The output is different if the query string is different, so I'm not ignoring the query string. My problem is that when I use the mem_cache module for this and look at the debug log, the effects seem different than when I use the disk_cache module. For mem_cache on every request it shows it getting cached again (and not getting served out of cache) or so that's how I'm reading it. For disk_cache it seems to cache it fine and serve out of cache on subsequent requests. Log with mem_cache (all requests): [Fri Feb 20 15:47:23 2009] [debug] mod_cache.c(131): Adding CACHE_SAVE filter for /path [Fri Feb 20 15:47:23 2009] [debug] mod_cache.c(138): Adding CACHE_REMOVE_URL filter for /path [Fri Feb 20 15:47:23 2009] [debug] mod_headers.c(740): headers: ap_headers_output_filter() [Fri Feb 20 15:47:23 2009] [debug] mod_cache.c(639): cache: Caching url: /path?var=value [Fri Feb 20 15:47:23 2009] [debug] mod_cache.c(645): cache: Removing CACHE_REMOVE_URL filter. [Fri Feb 20 15:47:23 2009] [info] mem_cache: Cached url: http://x.x.x.x/path?var=value Log with disk_cache (first request): [Fri Feb 20 15:55:18 2009] [debug] mod_cache.c(131): Adding CACHE_SAVE filter for /path [Fri Feb 20 15:55:18 2009] [debug] mod_cache.c(138): Adding CACHE_REMOVE_URL filter for /path [Fri Feb 20 15:55:18 2009] [debug] mod_headers.c(740): headers: ap_headers_output_filter() [Fri Feb 20 15:55:18 2009] [debug] mod_cache.c(639): cache: Caching url: /path?var=value [Fri Feb 20 15:55:18 2009] [debug] mod_cache.c(645): cache: Removing CACHE_REMOVE_URL filter. [Fri Feb 20 15:55:18 2009] [debug] mod_disk_cache.c(962): disk_cache: Stored headers for URL http://x.x.x.x/path?var=value [Fri Feb 20 15:55:18 2009] [debug] mod_disk_cache.c(1051): disk_cache: Body for URL http://x.x.x.x/path?var=value cached. Log with disk_cache (subsequent request): [Fri Feb 20 15:56:42 2009] [debug] mod_disk_cache.c(476): disk_cache: Recalled cached URL info header http://x.x.x.x/path?var=value [Fri Feb 20 15:56:42 2009] [debug] mod_disk_cache.c(749): disk_cache: Recalled headers for URL http://x.x.x.x/path?var=value [Fri Feb 20 15:56:42 2009] [debug] mod_cache.c(282): cache: running CACHE_OUT filter [Fri Feb 20 15:56:42 2009] [debug] mod_cache.c(296): cache: serving /path Response headers for content: Date Fri, 20 Feb 2009 23:01:08 GMT Server Apache Cache-Control max-age=300, must-revalidate Expires Fri, 20 Feb 2009 23:06:08 GMT Connection close Transfer-Encoding chunked Content-Type text/plain Content-Language En Cache config (mem): <IfModule mod_cache.c> CacheEnable mem /path CacheDefaultExpire 300 CacheIgnoreNoLastMod On CacheIgnoreQueryString Off <IfModule mod_disk_cache.c> CacheRoot /var/www/cache CacheDirLevels 1 CacheDirLength 4 CacheMaxFileSize 150000 CacheMinFileSize 10 </IfModule> <IfModule mod_mem_cache.c> MCacheRemovalAlgorithm LRU MCacheMaxObjectCount 100 MCacheMaxObjectSize 150000 MCacheMinObjectSize 10 MCacheSize 10240 </IfModule> </IfModule> Cache config (disk): Same as mem config except CacheEnable line is "CacheEnable disk /path" Any help is appreciated. -Tony --------------------------- Manager, IT Operations Format Dynamics, Inc. 303-573-1800x27 abia...@formatdynamics.com http://www.formatdynamics.com