LiteSpeed Cache - Version 2.2.0.2

Version Description

  • Apr 3 2018 =
  • [HOTFIX] Fixed the PHP warning when using Object Cache caused by previous improvement to Object Cache.
Download this release

Release Info

Developer LiteSpeedTech
Plugin Icon 128x128 LiteSpeed Cache
Version 2.2.0.2
Comparing to
See all releases

Code changes from version 2.2.0.1 to 2.2.0.2

inc/litespeed-cache.class.php CHANGED
@@ -19,7 +19,7 @@ class LiteSpeed_Cache
19
  private static $_instance ;
20
 
21
  const PLUGIN_NAME = 'litespeed-cache' ;
22
- const PLUGIN_VERSION = '2.2.0.1' ;
23
 
24
  const PAGE_EDIT_HTACCESS = 'lscache-edit-htaccess' ;
25
 
19
  private static $_instance ;
20
 
21
  const PLUGIN_NAME = 'litespeed-cache' ;
22
+ const PLUGIN_VERSION = '2.2.0.2' ;
23
 
24
  const PAGE_EDIT_HTACCESS = 'lscache-edit-htaccess' ;
25
 
inc/object.class.php CHANGED
@@ -25,8 +25,6 @@ class LiteSpeed_Cache_Object
25
  private static $_instance ;
26
 
27
  private $_oc_data_file ;
28
- private $_oc_wp_file ;
29
- private $_oc_ori_file ;
30
  private $_conn ;
31
  private $_cfg_enabled ;
32
  private $_cfg_method ;
@@ -56,8 +54,6 @@ class LiteSpeed_Cache_Object
56
  defined( 'LSCWP_LOG' ) && LiteSpeed_Cache_Log::debug2( '[Object] init' ) ;
57
 
58
  $this->_oc_data_file = WP_CONTENT_DIR . '/.object-cache.ini' ;
59
- $this->_oc_wp_file = WP_CONTENT_DIR . '/object-cache.php' ;
60
- $this->_oc_ori_file = LSCWP_DIR . 'lib/object-cache.php' ;
61
 
62
  if ( $cfg ) {
63
  $this->_cfg_method = $cfg[ LiteSpeed_Cache_Config::OPID_CACHE_OBJECT_KIND ] ? true : false ;
@@ -171,10 +167,14 @@ class LiteSpeed_Cache_Object
171
  ;
172
  Litespeed_File::save( $this->_oc_data_file, $data ) ;
173
 
 
 
 
 
174
  // Update cls file
175
- if ( ! file_exists( $this->_oc_wp_file ) || md5_file( $this->_oc_wp_file ) !== md5_file( $this->_oc_ori_file ) ) {
176
- defined( 'LSCWP_LOG' ) && LiteSpeed_Cache_Log::debug( '[Object] copying object-cache.php file to ' . $this->_oc_wp_file ) ;
177
- copy( $this->_oc_ori_file, $this->_oc_wp_file ) ;
178
  }
179
  }
180
 
@@ -186,10 +186,14 @@ class LiteSpeed_Cache_Object
186
  */
187
  public function del_file()
188
  {
189
- defined( 'LSCWP_LOG' ) && LiteSpeed_Cache_Log::debug( '[Object] removing ' . $this->_oc_wp_file ) ;
 
 
 
 
190
 
191
- if ( file_exists( $this->_oc_wp_file ) && md5_file( $this->_oc_wp_file ) === md5_file( $this->_oc_ori_file ) ) {
192
- unlink( $this->_oc_wp_file ) ;
193
  }
194
 
195
  file_exists( $this->_oc_data_file ) && unlink( $this->_oc_data_file ) ;
25
  private static $_instance ;
26
 
27
  private $_oc_data_file ;
 
 
28
  private $_conn ;
29
  private $_cfg_enabled ;
30
  private $_cfg_method ;
54
  defined( 'LSCWP_LOG' ) && LiteSpeed_Cache_Log::debug2( '[Object] init' ) ;
55
 
56
  $this->_oc_data_file = WP_CONTENT_DIR . '/.object-cache.ini' ;
 
 
57
 
58
  if ( $cfg ) {
59
  $this->_cfg_method = $cfg[ LiteSpeed_Cache_Config::OPID_CACHE_OBJECT_KIND ] ? true : false ;
167
  ;
168
  Litespeed_File::save( $this->_oc_data_file, $data ) ;
169
 
170
+ // NOTE: When included in oc.php, `LSCWP_DIR` will show undefined, so this must be assigned/generated when used
171
+ $_oc_ori_file = LSCWP_DIR . 'lib/object-cache.php' ;
172
+ $_oc_wp_file = WP_CONTENT_DIR . '/object-cache.php' ;
173
+
174
  // Update cls file
175
+ if ( ! file_exists( $_oc_wp_file ) || md5_file( $_oc_wp_file ) !== md5_file( $_oc_ori_file ) ) {
176
+ defined( 'LSCWP_LOG' ) && LiteSpeed_Cache_Log::debug( '[Object] copying object-cache.php file to ' . $_oc_wp_file ) ;
177
+ copy( $_oc_ori_file, $_oc_wp_file ) ;
178
  }
179
  }
180
 
186
  */
187
  public function del_file()
188
  {
189
+ // NOTE: When included in oc.php, `LSCWP_DIR` will show undefined, so this must be assigned/generated when used
190
+ $_oc_ori_file = LSCWP_DIR . 'lib/object-cache.php' ;
191
+ $_oc_wp_file = WP_CONTENT_DIR . '/object-cache.php' ;
192
+
193
+ defined( 'LSCWP_LOG' ) && LiteSpeed_Cache_Log::debug( '[Object] removing ' . $_oc_wp_file ) ;
194
 
195
+ if ( file_exists( $_oc_wp_file ) && md5_file( $_oc_wp_file ) === md5_file( $_oc_ori_file ) ) {
196
+ unlink( $_oc_wp_file ) ;
197
  }
198
 
199
  file_exists( $this->_oc_data_file ) && unlink( $this->_oc_data_file ) ;
includes/litespeed-cache.class.php CHANGED
@@ -19,7 +19,7 @@ class LiteSpeed_Cache
19
  private static $_instance ;
20
 
21
  const PLUGIN_NAME = 'litespeed-cache' ;
22
- const PLUGIN_VERSION = '2.2.0.1' ;
23
 
24
  const PAGE_EDIT_HTACCESS = 'lscache-edit-htaccess' ;
25
 
19
  private static $_instance ;
20
 
21
  const PLUGIN_NAME = 'litespeed-cache' ;
22
+ const PLUGIN_VERSION = '2.2.0.2' ;
23
 
24
  const PAGE_EDIT_HTACCESS = 'lscache-edit-htaccess' ;
25
 
litespeed-cache.php CHANGED
@@ -15,7 +15,7 @@
15
  * Plugin Name: LiteSpeed Cache
16
  * Plugin URI: https://www.litespeedtech.com/products/cache-plugins/wordpress-acceleration
17
  * Description: WordPress plugin to connect to LSCache on LiteSpeed Web Server.
18
- * Version: 2.2.0.1
19
  * Author: LiteSpeed Technologies
20
  * Author URI: https://www.litespeedtech.com
21
  * License: GPLv3
15
  * Plugin Name: LiteSpeed Cache
16
  * Plugin URI: https://www.litespeedtech.com/products/cache-plugins/wordpress-acceleration
17
  * Description: WordPress plugin to connect to LSCache on LiteSpeed Web Server.
18
+ * Version: 2.2.0.2
19
  * Author: LiteSpeed Technologies
20
  * Author URI: https://www.litespeedtech.com
21
  * License: GPLv3
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: LiteSpeedTech
3
  Tags: cache, wp-cache, litespeed, super cache, http2, total cache, optimize, object cache, redis, memcached, lazy load, database cleaner
4
  Requires at least: 4.0
5
  Tested up to: 4.9.4
6
- Stable tag: 2.2.0.1
7
  License: GPLv3
8
  License URI: http://www.gnu.org/licenses/gpl.html
9
 
@@ -252,6 +252,9 @@ Click on the `Advanced View` link at the top of the page, and several more tabs
252
 
253
  == Changelog ==
254
 
 
 
 
255
  = 2.2.0.1 - Apr 3 2018 =
256
  * [HOTFIX] Object parameter will no longer cause warnings to be logged for Purge and Cache classes. (@kelltech @khrifat)
257
  * [UPDATE] Removed duplicated del_file func from Object Cache class.
3
  Tags: cache, wp-cache, litespeed, super cache, http2, total cache, optimize, object cache, redis, memcached, lazy load, database cleaner
4
  Requires at least: 4.0
5
  Tested up to: 4.9.4
6
+ Stable tag: 2.2.0.2
7
  License: GPLv3
8
  License URI: http://www.gnu.org/licenses/gpl.html
9
 
252
 
253
  == Changelog ==
254
 
255
+ = 2.2.0.2 - Apr 3 2018 =
256
+ * [HOTFIX] Fixed the PHP warning when using Object Cache caused by previous improvement to Object Cache.
257
+
258
  = 2.2.0.1 - Apr 3 2018 =
259
  * [HOTFIX] Object parameter will no longer cause warnings to be logged for Purge and Cache classes. (@kelltech @khrifat)
260
  * [UPDATE] Removed duplicated del_file func from Object Cache class.