Cache Enabler – WordPress Cache - Version 1.0.6

Version Description

  • Fixed query string related caching issue
Download this release

Release Info

Developer keycdn
Plugin Icon 128x128 Cache Enabler – WordPress Cache
Version 1.0.6
Comparing to
See all releases

Code changes from version 1.0.5 to 1.0.6

cache-enabler.php CHANGED
@@ -6,10 +6,11 @@ Description: Simple and fast WordPress disk caching plugin.
6
  Author: KeyCDN
7
  Author URI: https://www.keycdn.com
8
  License: GPLv2 or later
9
- Version: 1.0.5
10
  */
11
 
12
  /*
 
13
  Copyright (C) 2015 KeyCDN
14
 
15
  This program is free software; you can redistribute it and/or modify
6
  Author: KeyCDN
7
  Author URI: https://www.keycdn.com
8
  License: GPLv2 or later
9
+ Version: 1.0.6
10
  */
11
 
12
  /*
13
+ Copyright (C) 2011-2015 Sergej Müller
14
  Copyright (C) 2015 KeyCDN
15
 
16
  This program is free software; you can redistribute it and/or modify
inc/cache_enabler.class.php CHANGED
@@ -1069,20 +1069,20 @@ final class Cache_Enabler {
1069
 
1070
 
1071
  /**
1072
- * definitaion of cache expection
1073
  *
1074
  * @since 1.0.0
1075
- * @change 1.0.0
1076
  *
1077
  * @return boolean true if exception
1078
  *
1079
- * @hook boolean skip_cache
1080
  */
1081
 
1082
  private static function _bypass_cache() {
1083
 
1084
  // skip cache hook
1085
- if ( apply_filters('skip_cache', false) ) {
1086
  return true;
1087
  }
1088
 
@@ -1104,6 +1104,11 @@ final class Cache_Enabler {
1104
  return true;
1105
  }
1106
 
 
 
 
 
 
1107
  // if logged in
1108
  if ( $options['if_loggedin'] && self::_is_logged_in() ) {
1109
  return true;
1069
 
1070
 
1071
  /**
1072
+ * check to bypass the cache
1073
  *
1074
  * @since 1.0.0
1075
+ * @change 1.0.6
1076
  *
1077
  * @return boolean true if exception
1078
  *
1079
+ * @hook boolean bypass cache
1080
  */
1081
 
1082
  private static function _bypass_cache() {
1083
 
1084
  // skip cache hook
1085
+ if ( apply_filters('bypass_cache', false) ) {
1086
  return true;
1087
  }
1088
 
1104
  return true;
1105
  }
1106
 
1107
+ // Request with query strings
1108
+ if ( ! empty($_GET) && get_option('permalink_structure') ) {
1109
+ return true;
1110
+ }
1111
+
1112
  // if logged in
1113
  if ( $options['if_loggedin'] && self::_is_logged_in() ) {
1114
  return true;
inc/cache_enabler_disk.class.php CHANGED
@@ -475,7 +475,7 @@ final class Cache_Enabler_Disk {
475
  * convert to webp source
476
  *
477
  * @since 1.0.1
478
- * @change 1.0.2
479
  *
480
  * @return string converted webp source
481
  */
@@ -492,7 +492,8 @@ final class Cache_Enabler_Disk {
492
  $upload_path = wp_upload_dir();
493
  $base_dir = $upload_path['basedir'];
494
 
495
- if ( file_exists($base_dir.$relative_path) ) {
 
496
  return $src_webp;
497
  }
498
 
475
  * convert to webp source
476
  *
477
  * @since 1.0.1
478
+ * @change 1.0.6
479
  *
480
  * @return string converted webp source
481
  */
492
  $upload_path = wp_upload_dir();
493
  $base_dir = $upload_path['basedir'];
494
 
495
+ // check if relative path is not empty and file exists
496
+ if ( !empty($relative_path) && file_exists($base_dir.$relative_path) ) {
497
  return $src_webp;
498
  }
499
 
readme.txt CHANGED
@@ -42,7 +42,7 @@ Just [contact us](https://www.keycdn.com/contacts "Support Request") directly to
42
 
43
 
44
  = Website =
45
- * [Cache Enabler by KeyCDN](https://www.keycdn.com/support/wordpress-cache-enabler-plugin/ "Cache Enabler Documentation")
46
 
47
 
48
  = Maintainer =
@@ -52,11 +52,14 @@ Just [contact us](https://www.keycdn.com/contacts "Support Request") directly to
52
 
53
 
54
  = Credits =
55
- This plugin is partially based on the Cachify plugin developed by [Sergej Müller](https://sergejmueller.github.io/ "Author Sergej Müller").
56
 
57
 
58
  == Changelog ==
59
 
 
 
 
60
  = 1.0.5 =
61
  * Credits update
62
 
42
 
43
 
44
  = Website =
45
+ * [Cache Enabler Documentation](https://www.keycdn.com/support/wordpress-cache-enabler-plugin/ "Cache Enabler Documentation")
46
 
47
 
48
  = Maintainer =
52
 
53
 
54
  = Credits =
55
+ This plugin is partially based on the Cachify plugin developed by [Sergej Müller](https://wordpress.org/plugins/cachify/ "Author Sergej Müller").
56
 
57
 
58
  == Changelog ==
59
 
60
+ = 1.0.6 =
61
+ * Fixed query string related caching issue
62
+
63
  = 1.0.5 =
64
  * Credits update
65