Title: Code: purging the cache as web hook
Last modified: August 30, 2016

---

# Code: purging the cache as web hook

 *  [Benjamin Pick](https://wordpress.org/support/users/benjaminpick/)
 * (@benjaminpick)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/code-purging-the-cache-as-web-hook/)
 * I have an automatic deployment setup, and each time the files are changed the
   caches need to be cleared, too. So here is how I automated it:
 * [https://gist.github.com/benjaminpick/67b6b9a49ef7991172f9](https://gist.github.com/benjaminpick/67b6b9a49ef7991172f9)
 * In my wp-config.php I’ve added a secret key.
 * [https://wordpress.org/plugins/clear-cache-for-widgets/](https://wordpress.org/plugins/clear-cache-for-widgets/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [webheadcoder](https://wordpress.org/support/users/webheadllc/)
 * (@webheadllc)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/code-purging-the-cache-as-web-hook/#post-6315191)
 * Thanks for this. I’ll add the code to the readme for people to know if they wish
   to have a webhook.
 *  Thread Starter [Benjamin Pick](https://wordpress.org/support/users/benjaminpick/)
 * (@benjaminpick)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/code-purging-the-cache-as-web-hook/#post-6315195)
 * I have updated the gist slightly.
 *  Plugin Author [webheadcoder](https://wordpress.org/support/users/webheadllc/)
 * (@webheadllc)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/code-purging-the-cache-as-web-hook/#post-6315197)
 * thanks. this is in the readme

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Code: purging the cache as web hook’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/clear-cache-for-widgets.svg)
 * [Clear Cache for Me](https://wordpress.org/plugins/clear-cache-for-widgets/)
 * [Support Threads](https://wordpress.org/support/plugin/clear-cache-for-widgets/)
 * [Active Topics](https://wordpress.org/support/plugin/clear-cache-for-widgets/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/clear-cache-for-widgets/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/clear-cache-for-widgets/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [webheadcoder](https://wordpress.org/support/users/webheadllc/)
 * Last activity: [10 years, 9 months ago](https://wordpress.org/support/topic/code-purging-the-cache-as-web-hook/#post-6315197)
 * Status: not a support question