Skip to content

Instantly share code, notes, and snippets.

@pmeissner
Created August 18, 2014 02:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pmeissner/26758b13cb7000e309d0 to your computer and use it in GitHub Desktop.
Save pmeissner/26758b13cb7000e309d0 to your computer and use it in GitHub Desktop.
Wiper
<?php
/**
* Class Hooks_wiper
*/
class Hooks_wiper extends Hooks
{
public function control_panel__publish($submission)
{
if ($this->fetchConfig('enable', false, null, true)) {
$this->addon->api('html_caching')->invalidateCache();
}
return $submission;
}
}
@iDGS
Copy link

iDGS commented Sep 3, 2014

per: Philip Meissner Aug 19, 2014; Author's comment copied from: https://plus.google.com/u/0/103138863218570906174/posts/hMSJx1ZK5jQ

+Ant Hubbard & +Ian Pitts Forgot to mention. If you use wiper, I think you need a _config > add-ons > wiper.yaml file with:

enable: true 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment