All,

I am having a heck of a time with getting mod_cache to work properly.
I am trying to have it cache a mixture of static files and proxy
generated content.

I'd greatly appreciate any suggestions.

First with mod_mem_cache I am seeing entries in my logs like the
following for a URL content generated by a proxy-balancer backend :

211 [Wed Aug 22 10:45:58 2007] [debug] mod_proxy_http.c(1662): proxy:
HTTP: serving URL http://127.0.0.1:9000/api/schedule
212 [Wed Aug 22 10:45:58 2007] [debug] proxy_util.c(1798): proxy:
HTTP: has acquired connection for (127.0.0.1)
213 [Wed Aug 22 10:45:58 2007] [debug] proxy_util.c(1858): proxy:
connecting http://127.0.0.1:9000/api/schedule to 127.0.0.1:9000
214 [Wed Aug 22 10:45:58 2007] [debug] proxy_util.c(1951): proxy:
connected /api/schedule to 127.0.0.1:9000
215 [Wed Aug 22 10:45:58 2007] [debug] proxy_util.c(2045): proxy:
HTTP: fam 2 socket created to connect to 127.0.0.1
216 [Wed Aug 22 10:45:58 2007] [debug] proxy_util.c(2141): proxy:
HTTP: connection complete to 127.0.0.1:9000 (127.0.0.1)
217 [Wed Aug 22 10:45:58 2007] [debug] mod_proxy_http.c(1448): proxy:
start body send
218 [Wed Aug 22 10:45:58 2007] [debug] mod_headers.c(612): headers:
ap_headers_output_filter()
219 [Wed Aug 22 10:45:58 2007] [debug] mod_cache.c(602): cache:
Caching url: /api/schedule
220 [Wed Aug 22 10:45:58 2007] [debug] mod_cache.c(608): cache:
Removing CACHE_REMOVE_URL filter.
221 [Wed Aug 22 10:45:58 2007] [info] mem_cache: Cached url:
http://sitev2:80/api/schedule?

But my backend is seeing a request to generate the info on every
subsequent request. No Age: is passed to the browser either, and the
Server: is not Apache but rather the backend.

Secondly my mod_disk_cache is not storing pages for the amount of time
specified. I can see that perhaps some requests get sent to the
backend and before it can reply a second one comes in.

[Mon Aug 20 15:38:58 2007] [debug] cache_storage.c(272): Cached
response for / isn't fresh.  Adding/replacing conditional request
headers.
[Mon Aug 20 15:39:00 2007] [debug] cache_storage.c(272): Cached
response for / isn't fresh.  Adding/replacing conditional request
headers.
[Mon Aug 20 15:39:06 2007] [debug] cache_storage.c(272): Cached
response for / isn't fresh.  Adding/replacing conditional request
headers.
[Mon Aug 20 15:39:23 2007] [debug] cache_storage.c(272): Cached
response for / isn't fresh.  Adding/replacing conditional request
headers.
[Mon Aug 20 15:39:23 2007] [debug] cache_storage.c(272): Cached
response for / isn't fresh.  Adding/replacing conditional request
headers.
[Mon Aug 20 15:39:24 2007] [debug] cache_storage.c(272): Cached
response for / isn't fresh.  Adding/replacing conditional request
headers.
[Mon Aug 20 15:40:59 2007] [debug] cache_storage.c(272): Cached
response for / isn't fresh.  Adding/replacing conditional request
headers.
[Mon Aug 20 15:41:48 2007] [debug] cache_storage.c(272): Cached
response for / isn't fresh.  Adding/replacing conditional request
headers.
[Mon Aug 20 15:41:51 2007] [debug] cache_storage.c(272): Cached
response for / isn't fresh.  Adding/replacing conditional request
headers.
[Mon Aug 20 15:41:52 2007] [debug] cache_storage.c(272): Cached
response for / isn't fresh.  Adding/replacing conditional request
headers.
[Mon Aug 20 15:41:55 2007] [debug] cache_storage.c(272): Cached
response for / isn't fresh.  Adding/replacing conditional request
headers.


#My configuration for my virtual host.
<IfModule mod_cache.c>
    UseCanonicalName On
    CacheIgnoreNoLastMod On
    CacheIgnoreCacheControl On
    CacheIgnoreHeaders Set-Cookie
    CacheDefaultExpire 600
    <IfModule mod_mem_cache.c>
      CacheEnable mem /xml/
      CacheEnable mem /api/
      CacheEnable mem /rss/
      MCacheMaxObjectSize 300000
      MCacheSize 50000
    </IfModule>
    <IfModule mod_disk_cache.c>
      CacheRoot  /var/cache/httpd
      CacheEnable disk /
      CacheDirLevels 2
      CacheDirLength 1
    </IfModule>
  </IfModule>

  ExpiresDefault A86400
  ExpiresByType image/x-icon A2592000
  ExpiresByType application/xml A33
  ExpiresByType text/xml A34
  ExpiresByType text/html A39
  ExpiresByType text/javascript A644800
  ExpiresByType text/css A644800
  ExpiresByType image/gif A604800
  ExpiresByType image/png A604800
  ExpiresByType image/jpeg A604800
  ExpiresByType application/x-shockwave-flash A604800
  ExpiresByType video/x-flv A604800
  ExpiresByType application/pdf A604800

  #Remove the Cache-Control coming from the backend
 Header unset Cache-Control

 <Proxy balancer://sitev2_cluster>
    BalancerMember http://127.0.0.1:9000
 </Proxy>

---------------------------------------------------------------------
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: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to