On 18/01/2011, at 3:58 PM, Fabio Vilela wrote:
> I would like to purge some object through the rails app, is that possible?
You need to configure Squid with an ACL to accept PURGE requests:
acl purge method PURGE
acl src_local src 127.0.0.0/8
http_access allow purge src_local
http_access deny purge
Then you can send PURGE requests via HTTP:
PURGE http://example.com/foo.jpg HTTP/1.0
Or use squidclient to generate the request:
squidclient -m PURGE http://example.com/foo.jpg
There's also the 3rd party squidpurge tool [1] which allows you to remove all
objects matching certain conditions:
purge -c /path/to/squid.conf -p 127.0.0.1:80 -se 'http://example.com/*.jpg'
-P1
Cheers,
Nathan de Vries
[1] http://www.wa.apana.org.au/~dean/squidpurge/README
--
You received this message because you are subscribed to the Google Groups "Ruby
or Rails Oceania" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rails-oceania?hl=en.