updated plugin W3 Total Cache
version 2.7.0
This commit is contained in:
@ -289,17 +289,25 @@ class Minify_MinifiedFileRequestHandler {
|
||||
|
||||
|
||||
/**
|
||||
* Flushes cache
|
||||
* Flushes cache.
|
||||
*
|
||||
* @return boolean
|
||||
* @return bool
|
||||
*/
|
||||
function flush() {
|
||||
public function flush( $extras = array() ) {
|
||||
$cache = $this->_get_cache();
|
||||
// used to debug - which plugin calls flush all the time and breaks
|
||||
// performance
|
||||
// Used to debug - which plugin calls flush all the time and breaks performance.
|
||||
if ( $this->_config->get_boolean( 'minify.debug' ) ) {
|
||||
Minify_Core::log( 'Minify flush called from' );
|
||||
Minify_Core::log( json_encode( debug_backtrace () ) );
|
||||
Minify_Core::log( wp_json_encode( debug_backtrace() ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* Cleanup of map too often is risky since breaks all old minify urls.
|
||||
* Particularly minified urls in browsercached/cdn cached html becomes invalid.
|
||||
*/
|
||||
if ( isset( $extras['ui_action'] ) && 'flush_button' === $extras['ui_action'] ) {
|
||||
global $wpdb;
|
||||
$wpdb->query( "DELETE FROM $wpdb->options WHERE `option_name` = 'w3tc_minify' OR `option_name` LIKE 'w3tc_minify_%'" );
|
||||
}
|
||||
|
||||
return $cache->flush();
|
||||
@ -543,6 +551,8 @@ class Minify_MinifiedFileRequestHandler {
|
||||
Minify_Core::debug_error( sprintf( 'Unable to fetch custom files list: "%s.%s"', $hash, $type ), false, 404 );
|
||||
}
|
||||
|
||||
Minify_Core::log( implode("\n", $files ) );
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user