Fast Velocity Minify - Version 3.2.7

Version Description

[2022.05.30] = * cloudways & godaddy cache purging fixes

Download this release

Release Info

Developer Alignak
Plugin Icon 128x128 Fast Velocity Minify
Version 3.2.7
Comparing to
See all releases

Code changes from version 3.2.6 to 3.2.7

Files changed (4) hide show
  1. fvm.php +6 -2
  2. inc/common.php +11 -3
  3. inc/frontend.php +1 -1
  4. readme.txt +5 -2
fvm.php CHANGED
@@ -6,7 +6,7 @@ Description: Improve your speed score on GTmetrix, Pingdom Tools and Google Page
6
  Author: Raul Peixoto
7
  Author URI: http://fastvelocity.com
8
  Text Domain: fast-velocity-minify
9
- Version: 3.2.6
10
  License: GPL2
11
 
12
  ------------------------------------------------------------------------
@@ -105,7 +105,11 @@ if(!is_admin()) {
105
  add_action('init', 'fvm_process_cache_purge_request');
106
 
107
  # actions for frontend only
108
- add_action('template_redirect', 'fvm_start_buffer', -PHP_INT_MAX);
 
 
 
 
109
 
110
  }
111
 
6
  Author: Raul Peixoto
7
  Author URI: http://fastvelocity.com
8
  Text Domain: fast-velocity-minify
9
+ Version: 3.2.7
10
  License: GPL2
11
 
12
  ------------------------------------------------------------------------
105
  add_action('init', 'fvm_process_cache_purge_request');
106
 
107
  # actions for frontend only
108
+ add_action('template_redirect', 'fvm_start_buffer', PHP_INT_MAX);
109
+
110
+ # actions for frontend only
111
+ add_action('template_redirect', 'fvm_start_buffer', PHP_INT_MAX);
112
+ add_action('shutdown', 'fvm_end_buffer', 0);
113
 
114
  }
115
 
inc/common.php CHANGED
@@ -262,12 +262,20 @@ function fvm_purge_others(){
262
  $ret[] = __( 'Nginx Helper' );
263
  }
264
 
 
 
 
 
 
 
265
 
266
  # Object Cache
267
 
268
  # WordPress OPCache
269
  if (function_exists('wp_cache_flush')) {
270
- wp_cache_flush();
 
 
271
  }
272
 
273
  # Purge Redis Object Cache plugin
@@ -374,7 +382,7 @@ function fvm_purge_varnish_cloudways() {
374
  if ('bypass' === trim($_SERVER['HTTP_X_APPLICATION'])){ return false; }
375
 
376
  # host and uri path
377
- $host = wpraiser_get_domain();
378
 
379
  # request arguments
380
  $request_args = array('method' => 'PURGE', 'redirection' => 0, 'timeout' => 10, 'blocking' => false, 'headers' => array('Host' => $host, 'X-Purge-Method' => 'regex') );
@@ -396,7 +404,7 @@ function fvm_purge_varnish_cloudways() {
396
  # Purge Godaddy Managed WordPress Hosting (Varnish)
397
  function fvm_godaddy_request( $method) {
398
  $url = home_url();
399
- $host = wpraiser_get_domain();
400
  $url = set_url_scheme( str_replace( $host, WPaas\Plugin::vip(), $url ), 'http' );
401
  update_option( 'gd_system_last_cache_flush', time(), 'no'); # purge apc
402
  wp_remote_request( esc_url_raw( $url ), array('method' => $method, 'blocking' => false, 'headers' => array('Host' => $host)) );
262
  $ret[] = __( 'Nginx Helper' );
263
  }
264
 
265
+ # Cache-Master
266
+ if ( function_exists( 'scm_clear_all_cache' ) ) {
267
+ scm_clear_all_cache();
268
+ return __( 'All caches on <strong>Cache-Master</strong> have been purged.', 'fast-velocity-minify' );
269
+ }
270
+
271
 
272
  # Object Cache
273
 
274
  # WordPress OPCache
275
  if (function_exists('wp_cache_flush')) {
276
+ if(wp_cache_flush()) {
277
+ return 'OPCache';
278
+ }
279
  }
280
 
281
  # Purge Redis Object Cache plugin
382
  if ('bypass' === trim($_SERVER['HTTP_X_APPLICATION'])){ return false; }
383
 
384
  # host and uri path
385
+ $host = fvm_get_domain();
386
 
387
  # request arguments
388
  $request_args = array('method' => 'PURGE', 'redirection' => 0, 'timeout' => 10, 'blocking' => false, 'headers' => array('Host' => $host, 'X-Purge-Method' => 'regex') );
404
  # Purge Godaddy Managed WordPress Hosting (Varnish)
405
  function fvm_godaddy_request( $method) {
406
  $url = home_url();
407
+ $host = fvm_get_domain();
408
  $url = set_url_scheme( str_replace( $host, WPaas\Plugin::vip(), $url ), 'http' );
409
  update_option( 'gd_system_last_cache_flush', time(), 'no'); # purge apc
410
  wp_remote_request( esc_url_raw( $url ), array('method' => $method, 'blocking' => false, 'headers' => array('Host' => $host)) );
inc/frontend.php CHANGED
@@ -1005,7 +1005,7 @@ function fvm_process_page($html) {
1005
  $element->outertext = '';
1006
  }
1007
 
1008
- # preload headers, by importance
1009
  if(is_array($htmlpreloads)) {
1010
 
1011
  # deduplicate
1005
  $element->outertext = '';
1006
  }
1007
 
1008
+ # preload headers, by fetchpriority attribute
1009
  if(is_array($htmlpreloads)) {
1010
 
1011
  # deduplicate
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: Alignak
3
  Tags: PHP Minify, Lighthouse, GTmetrix, Pingdom, Pagespeed, Merging, Minification, Optimization, Speed, Performance, FVM
4
  Requires at least: 4.9
5
  Requires PHP: 5.6
6
- Stable tag: 3.2.6
7
- Tested up to: 5.9.1
8
  Text Domain: fast-velocity-minify
9
  License: GPLv3 or later
10
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
@@ -49,6 +49,9 @@ You need a public directory to store and serve minified cache files. If you need
49
 
50
  == Changelog ==
51
 
 
 
 
52
  = 3.2.6 [2022.02.06] =
53
  * cache purging fixes
54
 
3
  Tags: PHP Minify, Lighthouse, GTmetrix, Pingdom, Pagespeed, Merging, Minification, Optimization, Speed, Performance, FVM
4
  Requires at least: 4.9
5
  Requires PHP: 5.6
6
+ Stable tag: 3.2.7
7
+ Tested up to: 6.0.1
8
  Text Domain: fast-velocity-minify
9
  License: GPLv3 or later
10
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
49
 
50
  == Changelog ==
51
 
52
+ = 3.2.7 [2022.05.30] =
53
+ * cloudways & godaddy cache purging fixes
54
+
55
  = 3.2.6 [2022.02.06] =
56
  * cache purging fixes
57