Skip to content

Commit

Permalink
Add wp fastest cache support (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Prosser authored Jan 2, 2018
1 parent c885208 commit 39c81aa
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion beaver-cache-helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public static function clear_caches() {
if ( function_exists( 'sg_cachepress_purge_cache' ) ) {
sg_cachepress_purge_cache();
}

// varnish
@wp_remote_request( get_site_url(), array( 'method' => 'BAN' ) );

Expand All @@ -55,6 +55,12 @@ public static function clear_caches() {
Cache_Enabler::clear_total_cache();
}

// wp fastest cache
if( class_exists( 'WpFastestCache' ) ) {
global $wp_fastest_cache;
$wp_fastest_cache->deleteCache( true );
}

error_log( 'Cleared Caches' );
}
/**
Expand Down

0 comments on commit 39c81aa

Please sign in to comment.