You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by rahul <ra...@Sun.COM> on 2008/06/03 15:01:00 UTC

Re: Adding purge/invalidation to mod_cache

| >| PURGE http://cachehost/someuri HTTP/1.1
| >| ....
| >
| >Isn't it better to do it as a uri - say - /cache-control - hosted on the 
| >proxy?
| >so the above would look like
| >
| >POST /cache-control?purge
| >
| >http://cachehost/someuri1
| >http://cachehost/someuri2
| >http://cachehost/someuri3
| >
| >
| >the advantage is that standard http clients like wget can be used to purge 
| >a
| >number of URLs (or based on wild cards) and it does not use any non-rfc 
| >methods.
| 
| If implemented as a handler it would also give you ACL/auth for free. OTOH 
| it gets more difficult to implement the actual deleting from the cache.
| Furthermore you cannot delete specific variants.

A simple minded cache purge (POC) is attached.
    1) does not understand variants.
    2) takes input as a post request with a number of URLs one per line
    3) generates our own request, so should be possible to add vary &
        headers
configuration
-------------
<Location /cache>
    SetHandler meta_cache
</Location>

invoke e.g

$cat > url.file
/index.html
http://webproxy.india.sun.com/index.html
^D

$wget --post-file url.file 'http://agneyam.india.sun.com:8080/cache?purge'

do let me know how I can improve this.

                                    rahul