You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Deepa Rangarajan <de...@hotmail.com> on 2005/03/18 00:51:24 UTC

Re: [users@httpd] mod_cache and mod_header

Hi,
  I am using Apache 2.0.46 (A) as my reverse proxy to an Apache server 
-2.0.52.(B)

I am trying to cache some files on my reverse proxy and hence have 
configured my httpd.conf as follows :

   CacheEnable disk /xxx
   CacheEnable disk /yyy
   CacheRoot "/var/cache/mod_proxy"
   CacheSize 1000000

The files for /xxx reside on server B. The files within that directory are 
image files. Hence I have added the Cache-Control header for them as follows 
:


   <Directory "xxx">
    <FilesMatch "\.(gif)$">
  Header append Cache-Control 
"max-age=300,s-maxage=300,public,must-revalidate,proxy-revalidate"
     </FilesMatch>
   </Directory>

I see that incase I change my image files, the new file gets loaded after 
300 seconds after it has been cached. Until then it retrieves from the cache 
which is right. But after the new file is loaded, even for the subsequent 
requests , I see that it goes to server B for retrieving the file, than 
retrieving from the cache . And in between it seems to retrieve from the 
cache too.

  The files seem to expire withing the max-age duration and at irregular 
intervals of time.

  Both my servers, A and B are set to the same time, though I am not using 
an NTP server.
I have tried searching as much over the net and trying various possibilities 
but still am unable to understand why the cache is not behaving as expected.

  Pls. let me know if you have any ideas/suggestions.

Thks,
-Deepa



---------------------------------------------------------------------
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


Re: [users@httpd] mod_cache and mod_header

Posted by Joshua Slive <js...@gmail.com>.
On Thu, 17 Mar 2005 17:51:24 -0600, Deepa Rangarajan
<de...@hotmail.com> wrote:
> Hi,
>   I am using Apache 2.0.46 (A) as my reverse proxy to an Apache server
> -2.0.52.(B)

(I seem to be giving this advice alot lately.)

I'd start by upgrading the proxy to the most recent release.  The
cache modules have undergone major development and bug-fixing between
2.0.46 and now.

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