bux23
2/5/2017 - 4:24 PM

Flush w3tc cache every hour

Flush w3tc cache every hour

//////////////////////////////////////////////////////////////
///////// FLUSH W3TC PERIODICALLY
//////////////////////////////////////////////////////////////
function w3_flush_cache( ) {
	$w3_plugin_totalcache->flush_all();
}
function w3tc_cache_flush() {
	if ( !wp_next_scheduled( 'w3_flush_cache' ) ) {
		wp_schedule_event( time(), 'hourly', 'w3_flush_cache' );
	}
}
add_action( 'wp', 'w3tc_cache_flush' );