aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorssm <ssm@web>2014-04-10 18:21:44 -0400
committeradmin <admin@branchable.com>2014-04-10 18:21:44 -0400
commitddea7cb62ad16fe604bd079c6011060cebd2d3c6 (patch)
tree04a480837559035a76640ce9c967740ddbaf9e47 /doc
parentd7e54aeb2f09986a9062d5147f6f85448bb3a843 (diff)
downloadikiwiki-ddea7cb62ad16fe604bd079c6011060cebd2d3c6.tar
ikiwiki-ddea7cb62ad16fe604bd079c6011060cebd2d3c6.tar.gz
Diffstat (limited to 'doc')
-rw-r--r--doc/plugins/contrib/purge.mdwn38
1 files changed, 38 insertions, 0 deletions
diff --git a/doc/plugins/contrib/purge.mdwn b/doc/plugins/contrib/purge.mdwn
new file mode 100644
index 000000000..cac3c508a
--- /dev/null
+++ b/doc/plugins/contrib/purge.mdwn
@@ -0,0 +1,38 @@
+[[!template id=plugin name=purge core=0 author="[[ssm]]"]]
+
+IkiWiki plugin to send PURGE requests to remote http cache server (like Varnish Cache) when your content changes.
+
+PURGE requests are sent for the changed page, as well as all pages indirectly changed when ikiwiki rebuilds the web pages.
+
+# Download
+
+Download from [Github](https://github.com/ssm/ikiwiki-plugin-purge)
+
+# Configure ikiwiki
+
+ # purge_url (mandatory), the address of your cache server.
+ purge_url: http://example.com/
+
+ # purge_timeout (optional, default 5) timeout in seconds for a purge request.
+
+ # purge_method (optional, default "PURGE") HTTP method to use.
+
+# Configure your cache server
+
+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.
+
+ acl origin_server {
+ "localhost";
+ "192.0.2.0"/24;
+ "2001:db8::"/64;
+ }
+
+ sub vcl_recv {
+ if (req.method == "PURGE") {
+ if (!client.ip ~ origin_server) {
+ return(synth(405,"Not allowed."));
+ }
+ return (purge);
+ }
+ }
+