If this is really an issue, you could write a script (using curl) that requests 
all of the images through you caching (reverse?) proxy in order to prime the 
cache...

-ascs


________________________________

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 09, 2006 3:36 AM
To: users@httpd.apache.org
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: [EMAIL PROTECTED] mod_cache behavior with proxied images - urls not 
cached



We are looking into caching images on Apache that are proxied from a backend 
server.  However, it looks like a lot of traffic will still go to the backend. 

We have Apache configured like this: 

<IfModule mod_cache.c> 

    <IfModule mod_mem_cache.c> 
        CacheIgnoreCacheControl On 
        CacheIgnoreNoLastMod On 
        CacheIgnoreHeaders Set-Cookie 
        CacheDefaultExpire 3600 
        CacheMaxExpire 86400 
        CacheEnable mem /backend/images 
        MCacheRemovalAlgorithm LRU 
        MCacheSize 32768 
        MCacheMaxObjectCount 1024 
        MCacheMinObjectSize 1 
        MCacheMaxObjectSize 1048576 
    </IfModule> 

</IfModule> 

If I remove all my local temporary files, then this seems to work well.  The 
image is retrieved from the backend and cached on Apache.  Then subsequent 
requests are handled by Apache. 

But, we have a large base of existing clients who will most likely already have 
local copies of images.  When such a client loads a page, the requests are 
passed through to the backend only to find that they have not been modified and 
a 302 is returned for each image.  This causes a lot of unnecessary traffic to 
the backend.  How can we avoid that? 

When Apache starts up, the cache is empty.  These images are not getting cached 
because the client issues a conditional GET.  The file is not in the Apache 
cache, so the request is passed to the backed. 
Then the backend responds with a 302 so Apache is not able to retrieve the 
image and put it in the cache.  Do we have to initialize the cache somehow?   

Thanks, 
Ed 


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