<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>purge (third party plugin)</title> <meta name="viewport" content="width=device-width, initial-scale=1" /> <link rel="stylesheet" href="../../style.css" type="text/css" /> <link rel="stylesheet" href="../../local.css" type="text/css" /> </head> <body> <div class="page"> <div class="pageheader"> <div class="header"> <span> <span class="parentlinks"> <a href="../../index.html">ikiwiki</a>/ <a href="../../plugins.html">plugins</a>/ <a href="../contrib.html">contrib</a>/ </span> <span class="title"> purge (third party plugin) </span> </span> </div> </div> <div id="pagebody"> <div id="content" role="main"> <p><span class="infobox"> Plugin: purge<br /> Author: <span class="createlink">ssm</span><br /> Included in ikiwiki: no<br /> Enabled by default: no<br /> Included in <a href="../goodstuff.html">goodstuff</a>: no<br /> Currently enabled: no<br /> </span></p> <p>IkiWiki plugin to send PURGE requests to remote http cache server (like Varnish Cache) when your content changes.</p> <p>PURGE requests are sent for the changed page, as well as all pages indirectly changed when ikiwiki rebuilds the web pages.</p> <h1>Download</h1> <p>Download from <a href="https://github.com/ssm/ikiwiki-plugin-purge">Github</a></p> <h1>Configure ikiwiki</h1> <pre><code># 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. </code></pre> <h1>Configure your cache server</h1> <p>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.</p> <pre><code>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); } } </code></pre> </div> </div> <div id="footer" class="pagefooter" role="contentinfo"> <div id="pageinfo"> <div class="pagedate"> Last edited <span class="date">Tue Feb 26 23:01:54 2019</span> <!-- Created <span class="date">Tue Feb 26 23:01:54 2019</span> --> </div> </div> <!-- from ikiwiki --> </div> </div> </body> </html>