Varnish HTTP Purge - Version 4.8.1

Version Description

  • May 2019
  • Compat with WP 5.2
  • Correct changes with DB cache flushing (props @mathieuhays)
  • Simplified logic for edge case debugging
Download this release

Release Info

Developer Ipstenu
Plugin Icon 128x128 Varnish HTTP Purge
Version 4.8.1
Comparing to
See all releases

Code changes from version 4.8 to 4.8.1

Files changed (3) hide show
  1. readme.txt +8 -2
  2. settings.php +1 -1
  3. varnish-http-purge.php +3 -3
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: Ipstenu, mikeschroder, techpriester, danielbachhuber
3
  Tags: proxy, purge, cache, varnish, nginx
4
  Requires at least: 4.7
5
- Tested up to: 5.1
6
- Stable tag: 4.8
7
  Requires PHP: 5.6
8
 
9
  Automatically empty proxy cached content when your site is modified.
@@ -203,6 +203,12 @@ This plugin is installed by default for _all_ DreamPress installs on DreamHost,
203
 
204
  == Changelog ==
205
 
 
 
 
 
 
 
206
  = 4.8 =
207
  * March 2019
208
  * Improve debugger
2
  Contributors: Ipstenu, mikeschroder, techpriester, danielbachhuber
3
  Tags: proxy, purge, cache, varnish, nginx
4
  Requires at least: 4.7
5
+ Tested up to: 5.2
6
+ Stable tag: 4.8.1
7
  Requires PHP: 5.6
8
 
9
  Automatically empty proxy cached content when your site is modified.
203
 
204
  == Changelog ==
205
 
206
+ = 4.8.1 =
207
+ * May 2019
208
+ * Compat with WP 5.2
209
+ * Correct changes with DB cache flushing (props @mathieuhays)
210
+ * Simplified logic for edge case debugging
211
+
212
  = 4.8 =
213
  * March 2019
214
  * Improve debugger
settings.php CHANGED
@@ -122,7 +122,7 @@ class VarnishStatus {
122
  if ( empty( $input ) ) {
123
  return; // do nothing.
124
  } else {
125
- $output['active'] = ( isset( $input['active'] ) || $input['active'] ) ? true : false;
126
  $output['expire'] = ( isset( $input['expire'] ) && is_int( $input['expire'] ) ) ? $input['expire'] : $expire;
127
  $set_message = ( $output['active'] ) ? __( 'Development Mode activated for the next 24 hours.', 'varnish-http-purge' ) : __( 'Development Mode dectivated.', 'varnish-http-purge' );
128
  $set_type = 'updated';
122
  if ( empty( $input ) ) {
123
  return; // do nothing.
124
  } else {
125
+ $output['active'] = ( isset( $input['active'] ) ) ? $input['active'] : false;
126
  $output['expire'] = ( isset( $input['expire'] ) && is_int( $input['expire'] ) ) ? $input['expire'] : $expire;
127
  $set_message = ( $output['active'] ) ? __( 'Development Mode activated for the next 24 hours.', 'varnish-http-purge' ) : __( 'Development Mode dectivated.', 'varnish-http-purge' );
128
  $set_type = 'updated';
varnish-http-purge.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Proxy Cache Purge
4
  * Plugin URI: https://halfelf.org/plugins/varnish-http-purge/
5
  * Description: Automatically empty cached pages when content on your site is modified.
6
- * Version: 4.8
7
  * Author: Mika Epstein
8
  * Author URI: https://halfelf.org/
9
  * License: http://www.apache.org/licenses/LICENSE-2.0
@@ -35,7 +35,7 @@ class VarnishPurger {
35
  * Version Number
36
  * @var string
37
  */
38
- public static $version = '4.7.2';
39
 
40
  /**
41
  * List of URLs to be purged
@@ -145,7 +145,7 @@ class VarnishPurger {
145
  // If the DB version we detect isn't the same as the version core thinks
146
  // we will fush DB cache. This may cause double dumping in some cases but
147
  // should not be harmful.
148
- if ( file_exists( WP_CONTENT_DIR . '/object-cache.php' ) && get_option( 'db_version' ) !== $wp_db_version ) {
149
  wp_cache_flush();
150
  }
151
 
3
  * Plugin Name: Proxy Cache Purge
4
  * Plugin URI: https://halfelf.org/plugins/varnish-http-purge/
5
  * Description: Automatically empty cached pages when content on your site is modified.
6
+ * Version: 4.8.1
7
  * Author: Mika Epstein
8
  * Author URI: https://halfelf.org/
9
  * License: http://www.apache.org/licenses/LICENSE-2.0
35
  * Version Number
36
  * @var string
37
  */
38
+ public static $version = '4.8.1';
39
 
40
  /**
41
  * List of URLs to be purged
145
  // If the DB version we detect isn't the same as the version core thinks
146
  // we will fush DB cache. This may cause double dumping in some cases but
147
  // should not be harmful.
148
+ if ( file_exists( WP_CONTENT_DIR . '/object-cache.php' ) && (int) get_option( 'db_version' ) !== $wp_db_version ) {
149
  wp_cache_flush();
150
  }
151