RE: [users@httpd] Apache reverse and caching proxy

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The mod_expires that you activate with "ExpiresActive On" will add an Expires header to the responses sent to the client. It does nothing for Apache cache expiration. It does however have an effect on the expiration of downstream caches, in your case probably on the User Agent cache.

For cache expiration you should use the CacheDefaultExpire directive.  I believe mod_cache will make a conditional request for the resource when the cache entry gets stale. 

If you set CacheDefaultExpires to a low value, mod_cache will frequently try to refresh the cache. 

CacheDefaultExpires affects only responses that do not contain an explicit expiry date.
 
-ascs
________________________________

From: Wim.Van.Leuven@xxxxxx [mailto:Wim.Van.Leuven@xxxxxx] 
Sent: Thursday, January 12, 2006 3:02 PM
To: users@xxxxxxxxxxxxxxxx
Subject: [users@httpd] Apache reverse and caching proxy



Hello all, 

I'm retrying my configuration for a caching proxy server which flushes the cache on the modification time of the files. However, It doesn't seem to work anymore. The files get cached but are not refreshed on a touch of the file on the source server. 

Not sure what I changed that it doesn't work anymore. As far as I'm concerned, I do nothing more then setup an apache server to serve static files from disk in an ordinary manner. Next I put a proxy server in front. The configuration of the proxy can be found at the end. 

When inspecting the debug logs and the http headers, all files get cached at the proxy. However when I change the modification time of the files on the source servers, the cache doesn't get updated. Thus still serving the old version of the file. 

As a matter a fact, once a file is cached, the source server is never accessed anymore to verify the correctness of the cache against the remote instances. 

Does anybody have a clue about which sublety I'm missing here? 

Thanks beforehand! 
Wim Van Leuven 

________________________________ 

... 
ExpiresActive On 
ExpiresDefault "modification" 
... 
ProxyRequests Off 

<Proxy *> 
    Order deny,allow 
    Allow from all 
</Proxy> 

ProxyPass / http://srcsvr.ldc.local/ 
ProxyPassReverse / http://srcsvr.ldc.local/ 

# Cache configuration 
<IfModule mod_cache.c> 
    LoadModule disk_cache_module modules/mod_disk_cache.so 
    <IfModule mod_disk_cache.c> 
            CacheRoot "C:/Program Files/Apache Group/Apache2/cache" 
            CacheSize 256 
            CacheEnable disk / 
            CacheDirLevels 5 
            CacheDirLength 3 
            CacheIgnoreCacheControl Off 
    </IfModule> 
    
    #LoadModule mem_cache_module modules/mod_mem_cache.so 
    <IfModule mod_mem_cache.c> 
        CacheEnable mem / 
        MCacheSize 4096 
        MCacheMaxObjectCount 100 
        MCacheMinObjectSize 1 
        MCacheMaxObjectSize 2048 
    </IfModule>     
</IfModule> 


---------------------------------------------------------------------
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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux