https://issues.apache.org/bugzilla/show_bug.cgi?id=55669

--- Comment #6 from Asif Mushtaq <[email protected]> ---
Hello, we are observing similar behavior with our apache 2.2.23 deployment
using mod_disk_cache. We are using apache to load balance and cache images from
backend tomcat servers. The issues is that if someone visits a URL which has
not yet been published hence resulting in a "404 Not Found" response, these
responses are getting cached also. Needless to say this causes issues when the
actual content is published later because the frontend proxy continues to serve
out cached "404 Not Found" response. We need to have a way to selectively
cache/not cache content based on response codes. Below is the relevant config
snippet.

<VirtualHost *:8080>                      

    ## Apache Load Balancing configuration
    <Proxy balancer://image-origin/>      
        BalancerMember http://oc1.etilize.com
        BalancerMember http://oc3.etilize.com
        ProxySet lbmethod=bybusyness         
        Order allow,deny                     
        Allow from env=allow_request                              
        Deny  from env=crawler                                    
        allow from all                                            
        #Expiry settings                                          
        ExpiresActive On                                          
        ExpiresDefault "access plus 15 days"                      

    </Proxy>                                                      

    ProxyPass / balancer://image-origin/
    ProxyPassReverse / balancer://image-origin/

    ## Apache Caching Configuration
    <IfModule mod_cache.c>         
        <IfModule mod_disk_cache.c>
            CacheEnable disk /       
            CacheRoot "/ebs/cache"
            CacheDirLength 1      
            CacheDirLevels 2
            CacheMaxFileSize 5000000
        </IfModule>
    </IfModule>

</VirtualHost>

Thanks,

Asif Mushtaq

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to