Title: flush cache hook/function from outside plugin
Last modified: September 1, 2016

---

# flush cache hook/function from outside plugin

 *  [bheadrick](https://wordpress.org/support/users/bheadrick/)
 * (@bheadrick)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/flush-cache-hookfunction-from-outside-plugin/)
 * I’m using wp rocket in conjunction with this plugin, though wp-rocket has its
   page caching disabled.
 * I want to be able to use a trigger from when I clear the minify cache on wp rocket
   that it will clear the site cache as well.
 * would that be just
    $nginxchampuru = NginxChampuru::get_instance(); $nginxchampuru-
   >transientExec(“flush_cache”, “all”, false);
 * [https://wordpress.org/plugins/nginx-champuru/](https://wordpress.org/plugins/nginx-champuru/)

Viewing 1 replies (of 1 total)

 *  Thread Starter [bheadrick](https://wordpress.org/support/users/bheadrick/)
 * (@bheadrick)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/flush-cache-hookfunction-from-outside-plugin/#post-7536141)
 * For anyone interested, This is what I have in an mu-plugin file:
 * //disable rocket cache page caching
    add_filter( ‘do_rocket_generate_caching_files’,‘
   __return_false’ );
 * //after rocket cache rebuilds minify cache, etc, flush nginx cache
    add_action(‘
   after_rocket_clean_domain’, ‘pw_nginx_flush_cache’);
 * function pw_nginx_flush_cache(){
    $nginxchampuru = NginxChampuru::get_instance();
   if($nginxchampuru !=null){ $nginxchampuru->transientExec(“flush_cache”, “all”,
   false); }
 *  else{
    error_log(‘nginx controller not loaded’); } }

Viewing 1 replies (of 1 total)

The topic ‘flush cache hook/function from outside plugin’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/nginx-champuru_bababa.svg)
 * [Nginx Cache Controller](https://wordpress.org/plugins/nginx-champuru/)
 * [Support Threads](https://wordpress.org/support/plugin/nginx-champuru/)
 * [Active Topics](https://wordpress.org/support/plugin/nginx-champuru/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/nginx-champuru/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/nginx-champuru/reviews/)

 * 1 reply
 * 1 participant
 * Last reply from: [bheadrick](https://wordpress.org/support/users/bheadrick/)
 * Last activity: [9 years, 11 months ago](https://wordpress.org/support/topic/flush-cache-hookfunction-from-outside-plugin/#post-7536141)
 * Status: not resolved