1 [[!template id=plugin name=purge core=0 author="[[users/ssm]]"]]
3 IkiWiki plugin to send PURGE requests to remote http cache server (like Varnish Cache) when your content changes.
5 PURGE requests are sent for the changed page, as well as all pages indirectly changed when ikiwiki rebuilds the web pages.
9 Download from [Github](https://github.com/ssm/ikiwiki-plugin-purge)
13 # purge_url (mandatory), the address of your cache server.
14 purge_url: http://example.com/
16 # purge_timeout (optional, default 5) timeout in seconds for a purge request.
18 # purge_method (optional, default "PURGE") HTTP method to use.
20 # Configure your cache server
22 For Varnish, you'll need to add a handler for the non-standard "PURGE" method, and preferrably an ACL which restricts who can send these requests to empty your cache.
31 if (req.method == "PURGE") {
32 if (!client.ip ~ origin_server) {
33 return(synth(405,"Not allowed."));