Version Description
- Fix: Fixed Memcached flush logic
- Fix: Remove disk enhanced rewrites when disabling page cache
- Fix: Better handle conflicts on activation
Download this release
Release Info
Developer | joemoto |
Plugin | W3 Total Cache |
Version | 0.15.1 |
Comparing to | |
See all releases |
Code changes from version 0.15.0 to 0.15.1
- Cache_Memcache.php +6 -2
- Cache_Memcached.php +6 -2
- PgCache_Environment.php +13 -4
- Root_AdminActivation.php +1 -0
- Util_Activation.php +38 -30
- readme.txt +6 -1
- w3-total-cache-api.php +1 -1
- w3-total-cache.php +1 -1
Cache_Memcache.php
CHANGED
@@ -220,6 +220,7 @@ class Cache_Memcache extends Cache_Base {
|
|
220 |
// expiration has to be as long as possible since
|
221 |
// all cache data expires when key version expires
|
222 |
@$this->_memcache->set( $this->_get_key_version_key( $group ), $v, false, 0 );
|
|
|
223 |
}
|
224 |
|
225 |
/**
|
@@ -231,9 +232,12 @@ class Cache_Memcache extends Cache_Base {
|
|
231 |
*/
|
232 |
private function _increment_key_version( $group = '' ) {
|
233 |
$r = @$this->_memcache->increment( $this->_get_key_version_key( $group ), 1 );
|
234 |
-
|
|
|
|
|
|
|
235 |
// it doesn't initialize the key if it doesn't exist.
|
236 |
-
$this->_set_key_version(
|
237 |
}
|
238 |
}
|
239 |
|
220 |
// expiration has to be as long as possible since
|
221 |
// all cache data expires when key version expires
|
222 |
@$this->_memcache->set( $this->_get_key_version_key( $group ), $v, false, 0 );
|
223 |
+
$this->_key_version[$group] = $v;
|
224 |
}
|
225 |
|
226 |
/**
|
232 |
*/
|
233 |
private function _increment_key_version( $group = '' ) {
|
234 |
$r = @$this->_memcache->increment( $this->_get_key_version_key( $group ), 1 );
|
235 |
+
|
236 |
+
if ( $r ) {
|
237 |
+
$this->_key_version[$group] = $r;
|
238 |
+
} else {
|
239 |
// it doesn't initialize the key if it doesn't exist.
|
240 |
+
$this->_set_key_version( 2, $group );
|
241 |
}
|
242 |
}
|
243 |
|
Cache_Memcached.php
CHANGED
@@ -283,6 +283,7 @@ class Cache_Memcached extends Cache_Base {
|
|
283 |
// expiration has to be as long as possible since
|
284 |
// all cache data expires when key version expires
|
285 |
@$this->_memcache->set( $this->_get_key_version_key( $group ), $v, 0 );
|
|
|
286 |
}
|
287 |
|
288 |
/**
|
@@ -294,9 +295,12 @@ class Cache_Memcached extends Cache_Base {
|
|
294 |
*/
|
295 |
private function _increment_key_version( $group = '' ) {
|
296 |
$r = @$this->_memcache->increment( $this->_get_key_version_key( $group ), 1 );
|
297 |
-
|
|
|
|
|
|
|
298 |
// it doesn't initialize the key if it doesn't exist.
|
299 |
-
$this->_set_key_version(
|
300 |
}
|
301 |
}
|
302 |
|
283 |
// expiration has to be as long as possible since
|
284 |
// all cache data expires when key version expires
|
285 |
@$this->_memcache->set( $this->_get_key_version_key( $group ), $v, 0 );
|
286 |
+
$this->_key_version[$group] = $v;
|
287 |
}
|
288 |
|
289 |
/**
|
295 |
*/
|
296 |
private function _increment_key_version( $group = '' ) {
|
297 |
$r = @$this->_memcache->increment( $this->_get_key_version_key( $group ), 1 );
|
298 |
+
|
299 |
+
if ( $r ) {
|
300 |
+
$this->_key_version[$group] = $r;
|
301 |
+
} else {
|
302 |
// it doesn't initialize the key if it doesn't exist.
|
303 |
+
$this->_set_key_version( 2, $group );
|
304 |
}
|
305 |
}
|
306 |
|
PgCache_Environment.php
CHANGED
@@ -27,7 +27,7 @@ class PgCache_Environment {
|
|
27 |
$this->fix_folders( $config, $exs );
|
28 |
|
29 |
if ( $config->get_boolean( 'config.check' ) || $force_all_checks ) {
|
30 |
-
if ( $this->
|
31 |
$this->rules_core_add( $config, $exs );
|
32 |
$this->rules_cache_add( $config, $exs );
|
33 |
} else {
|
@@ -124,10 +124,19 @@ class PgCache_Environment {
|
|
124 |
throw $exs;
|
125 |
}
|
126 |
|
127 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
128 |
$e = $c->get_string( 'pgcache.engine' );
|
129 |
|
130 |
-
return (
|
|
|
131 |
}
|
132 |
|
133 |
/**
|
@@ -137,7 +146,7 @@ class PgCache_Environment {
|
|
137 |
* @return array
|
138 |
*/
|
139 |
public function get_required_rules( $config ) {
|
140 |
-
if ( !$this->
|
141 |
return null;
|
142 |
}
|
143 |
|
27 |
$this->fix_folders( $config, $exs );
|
28 |
|
29 |
if ( $config->get_boolean( 'config.check' ) || $force_all_checks ) {
|
30 |
+
if ( $this->is_rules_required( $config ) ) {
|
31 |
$this->rules_core_add( $config, $exs );
|
32 |
$this->rules_cache_add( $config, $exs );
|
33 |
} else {
|
124 |
throw $exs;
|
125 |
}
|
126 |
|
127 |
+
/**
|
128 |
+
* Are rewrite rules required?.
|
129 |
+
*
|
130 |
+
* @since 0.9.7.3
|
131 |
+
*
|
132 |
+
* @param Config $c Configuration.
|
133 |
+
* @return bool
|
134 |
+
*/
|
135 |
+
private function is_rules_required( $c ) {
|
136 |
$e = $c->get_string( 'pgcache.engine' );
|
137 |
|
138 |
+
return $c->get_boolean( 'pgcache.enabled' ) &&
|
139 |
+
( 'file_generic' === $e || 'nginx_memcached' === $e );
|
140 |
}
|
141 |
|
142 |
/**
|
146 |
* @return array
|
147 |
*/
|
148 |
public function get_required_rules( $config ) {
|
149 |
+
if ( !$this->is_rules_required( $config ) ) {
|
150 |
return null;
|
151 |
}
|
152 |
|
Root_AdminActivation.php
CHANGED
@@ -54,6 +54,7 @@ class Root_AdminActivation {
|
|
54 |
} catch ( \Exception $ex ) {
|
55 |
}
|
56 |
}
|
|
|
57 |
} catch ( \Exception $e ) {
|
58 |
Util_Activation::error_on_exception( $e );
|
59 |
}
|
54 |
} catch ( \Exception $ex ) {
|
55 |
}
|
56 |
}
|
57 |
+
} catch ( Util_Environment_Exceptions $e ) {
|
58 |
} catch ( \Exception $e ) {
|
59 |
Util_Activation::error_on_exception( $e );
|
60 |
}
|
Util_Activation.php
CHANGED
@@ -76,14 +76,15 @@ class Util_Activation {
|
|
76 |
( file_exists( $path ) ? $path : dirname( $path ) ) );
|
77 |
}
|
78 |
if ( Util_File::check_open_basedir( $path ) ) {
|
79 |
-
$error = sprintf(
|
80 |
-
|
81 |
-
|
|
|
82 |
} else {
|
83 |
-
$error = sprintf(
|
84 |
-
|
85 |
-
|
86 |
-
ini_get( 'open_basedir' ) );
|
87 |
}
|
88 |
|
89 |
throw new \Exception( $error );
|
@@ -135,9 +136,10 @@ class Util_Activation {
|
|
135 |
$operation_error_already_shown = true;
|
136 |
}
|
137 |
if ( $ex instanceof Util_WpFile_FilesystemWriteException ) {
|
138 |
-
$required_changes .=
|
139 |
-
|
140 |
-
|
|
|
141 |
} else if ( $ex instanceof Util_WpFile_FilesystemModifyException ) {
|
142 |
$modification_content = $ex->file_contents();
|
143 |
if ( strlen( $modification_content ) > 0 )
|
@@ -222,26 +224,32 @@ class Util_Activation {
|
|
222 |
$ftp_form = str_replace( '</fieldset>', '', $ftp_form );
|
223 |
$ftp_form = str_replace( 'id="upgrade" class="button"',
|
224 |
'id="upgrade" class="button w3tc-button-save"', $ftp_form );
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
245 |
) . '<div class="w3tc-required-changes" style="' .
|
246 |
$changes_style . '">' . $r['required_changes'] . '</div>' .
|
247 |
'<div class="w3tc-ftp-form" style="' . $ftp_style . '">' .
|
76 |
( file_exists( $path ) ? $path : dirname( $path ) ) );
|
77 |
}
|
78 |
if ( Util_File::check_open_basedir( $path ) ) {
|
79 |
+
$error = sprintf(
|
80 |
+
__( '<strong>%s</strong> could not be created, please run following command:<br />%s',
|
81 |
+
'w3-total-cache' ),
|
82 |
+
$path, $chmods );
|
83 |
} else {
|
84 |
+
$error = sprintf(
|
85 |
+
__( '<strong>%s</strong> could not be created, <strong>open_basedir</strong> restriction in effect, please check your php.ini settings:<br /><strong style="color: #f00;">open_basedir = "%s"</strong>',
|
86 |
+
'w3-total-cache' ),
|
87 |
+
$path, ini_get( 'open_basedir' ) );
|
88 |
}
|
89 |
|
90 |
throw new \Exception( $error );
|
136 |
$operation_error_already_shown = true;
|
137 |
}
|
138 |
if ( $ex instanceof Util_WpFile_FilesystemWriteException ) {
|
139 |
+
$required_changes .= sprintf(
|
140 |
+
__( 'Create the <strong>%s</strong> file and paste the following text into it: <textarea>%s</textarea> <br />',
|
141 |
+
'w3-total-cache' ),
|
142 |
+
$ex->filename(), esc_textarea( $ex->file_contents() ) );
|
143 |
} else if ( $ex instanceof Util_WpFile_FilesystemModifyException ) {
|
144 |
$modification_content = $ex->file_contents();
|
145 |
if ( strlen( $modification_content ) > 0 )
|
224 |
$ftp_form = str_replace( '</fieldset>', '', $ftp_form );
|
225 |
$ftp_form = str_replace( 'id="upgrade" class="button"',
|
226 |
'id="upgrade" class="button w3tc-button-save"', $ftp_form );
|
227 |
+
|
228 |
+
$error = sprintf( '
|
229 |
+
%s
|
230 |
+
<table>
|
231 |
+
<tr>
|
232 |
+
<td>%s</td>
|
233 |
+
<td>%s</td>
|
234 |
+
</tr>
|
235 |
+
<tr>
|
236 |
+
<td>%s</td>
|
237 |
+
<td>%s</td>
|
238 |
+
</tr></table>',
|
239 |
+
__( '<strong>W3 Total Cache Error:</strong> Files and directories could not be automatically deleted.' , 'w3-total-cache' ),
|
240 |
+
__( 'Please execute commands manually' , 'w3-total-cache' ),
|
241 |
+
__( 'or use FTP form to allow <strong>W3 Total Cache</strong> make it automatically.' ,
|
242 |
+
'w3-total-cache' ),
|
243 |
+
Util_Ui::button(
|
244 |
+
__( 'View required changes', 'w3-total-cache' ),
|
245 |
+
'',
|
246 |
+
'w3tc-show-required-changes'
|
247 |
+
),
|
248 |
+
Util_Ui::button(
|
249 |
+
__( 'Update via FTP', 'w3-total-cache' ),
|
250 |
+
'',
|
251 |
+
'w3tc-show-ftp-form'
|
252 |
+
)
|
253 |
) . '<div class="w3tc-required-changes" style="' .
|
254 |
$changes_style . '">' . $r['required_changes'] . '</div>' .
|
255 |
'<div class="w3tc-ftp-form" style="' . $ftp_style . '">' .
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: boldgrid, fredericktownes, maxicusc, gidomanders, bwmarkle, harryj
|
|
3 |
Tags: seo, cache, optimize, pagespeed, performance, caching, compression, maxcdn, nginx, varnish, redis, new relic, aws, amazon web services, s3, cloudfront, rackspace, cloudflare, azure, apache
|
4 |
Requires at least: 3.2
|
5 |
Tested up to: 5.5
|
6 |
-
Stable tag: 0.15.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -275,6 +275,11 @@ Please reach out to all of these people and support their projects if you're so
|
|
275 |
|
276 |
== Changelog ==
|
277 |
|
|
|
|
|
|
|
|
|
|
|
278 |
= 0.15.0 =
|
279 |
* Feature: Added TransparentCDN full-site delivery option
|
280 |
* Fix: Update settings on activation in a changed environment
|
3 |
Tags: seo, cache, optimize, pagespeed, performance, caching, compression, maxcdn, nginx, varnish, redis, new relic, aws, amazon web services, s3, cloudfront, rackspace, cloudflare, azure, apache
|
4 |
Requires at least: 3.2
|
5 |
Tested up to: 5.5
|
6 |
+
Stable tag: 0.15.1
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
275 |
|
276 |
== Changelog ==
|
277 |
|
278 |
+
= 0.15.1 =
|
279 |
+
* Fix: Fixed Memcached flush logic
|
280 |
+
* Fix: Remove disk enhanced rewrites when disabling page cache
|
281 |
+
* Fix: Better handle conflicts on activation
|
282 |
+
|
283 |
= 0.15.0 =
|
284 |
* Feature: Added TransparentCDN full-site delivery option
|
285 |
* Fix: Update settings on activation in a changed environment
|
w3-total-cache-api.php
CHANGED
@@ -5,7 +5,7 @@ if ( !defined( 'ABSPATH' ) ) {
|
|
5 |
}
|
6 |
|
7 |
define( 'W3TC', true );
|
8 |
-
define( 'W3TC_VERSION', '0.15.
|
9 |
define( 'W3TC_POWERED_BY', 'W3 Total Cache' );
|
10 |
define( 'W3TC_EMAIL', 'w3tc@w3-edge.com' );
|
11 |
define( 'W3TC_TEXT_DOMAIN', 'w3-total-cache' );
|
5 |
}
|
6 |
|
7 |
define( 'W3TC', true );
|
8 |
+
define( 'W3TC_VERSION', '0.15.1' );
|
9 |
define( 'W3TC_POWERED_BY', 'W3 Total Cache' );
|
10 |
define( 'W3TC_EMAIL', 'w3tc@w3-edge.com' );
|
11 |
define( 'W3TC_TEXT_DOMAIN', 'w3-total-cache' );
|
w3-total-cache.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: W3 Total Cache
|
4 |
* Plugin URI: https://www.boldgrid.com/totalcache/
|
5 |
* Description: The highest rated and most complete WordPress performance plugin. Dramatically improve the speed and user experience of your site. Add browser, page, object and database caching as well as minify and content delivery network (CDN) to WordPress.
|
6 |
-
* Version: 0.15.
|
7 |
* Requires at least: 3.2
|
8 |
* Requires PHP: 5.3
|
9 |
* Author: BoldGrid
|
3 |
* Plugin Name: W3 Total Cache
|
4 |
* Plugin URI: https://www.boldgrid.com/totalcache/
|
5 |
* Description: The highest rated and most complete WordPress performance plugin. Dramatically improve the speed and user experience of your site. Add browser, page, object and database caching as well as minify and content delivery network (CDN) to WordPress.
|
6 |
+
* Version: 0.15.1
|
7 |
* Requires at least: 3.2
|
8 |
* Requires PHP: 5.3
|
9 |
* Author: BoldGrid
|