LiteSpeed Cache - Version 2.2.0.1

Version Description

  • Apr 3 2018 =
  • [HOTFIX] Object parameter will no longer cause warnings to be logged for Purge and Cache classes. (@kelltech @khrifat)
  • [UPDATE] Removed duplicated del_file func from Object Cache class.
  • [BUGFIX] CLI no longer shows 400 error upon successful result.
Download this release

Release Info

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

Code changes from version 2.2 to 2.2.0.1

admin/litespeed-cache-admin-settings.class.php CHANGED
@@ -300,7 +300,7 @@ class LiteSpeed_Cache_Admin_Settings
300
  if ( $new_options[ $id ] ) {
301
  $all_options = array_merge( $new_options, $item_options ) ;
302
  LiteSpeed_Cache_Log::debug( '[Settings] Update .object_cache.ini and flush object cache' ) ;
303
- LiteSpeed_Cache_Object::get_instance()->update_file( true, $all_options ) ;
304
  /**
305
  * Clear object cache
306
  */
@@ -309,7 +309,7 @@ class LiteSpeed_Cache_Admin_Settings
309
  else {
310
  if ( defined( 'LSCWP_OBJECT_CACHE' ) ) {
311
  LiteSpeed_Cache_Log::debug( '[Settings] Remove .object_cache.ini' ) ;
312
- LiteSpeed_Cache_Object::get_instance()->update_file( false ) ;
313
  }
314
  }
315
  }
@@ -884,7 +884,9 @@ class LiteSpeed_Cache_Admin_Settings
884
  // Remove Object Cache
885
  if ( $this->_options[ LiteSpeed_Cache_Config::OPID_DEBUG_DISABLE_ALL ] ) {
886
  LiteSpeed_Cache_Log::debug( '[Settings] Remove .object_cache.ini due to debug_disable_all' ) ;
887
- LiteSpeed_Cache_Object::get_instance()->update_file( false ) ;
 
 
888
  define( 'LITESPEED_DISABLE_OBJECT', true ) ;
889
  }
890
 
300
  if ( $new_options[ $id ] ) {
301
  $all_options = array_merge( $new_options, $item_options ) ;
302
  LiteSpeed_Cache_Log::debug( '[Settings] Update .object_cache.ini and flush object cache' ) ;
303
+ LiteSpeed_Cache_Object::get_instance()->update_file( $all_options ) ;
304
  /**
305
  * Clear object cache
306
  */
309
  else {
310
  if ( defined( 'LSCWP_OBJECT_CACHE' ) ) {
311
  LiteSpeed_Cache_Log::debug( '[Settings] Remove .object_cache.ini' ) ;
312
+ LiteSpeed_Cache_Object::get_instance()->del_file() ;
313
  }
314
  }
315
  }
884
  // Remove Object Cache
885
  if ( $this->_options[ LiteSpeed_Cache_Config::OPID_DEBUG_DISABLE_ALL ] ) {
886
  LiteSpeed_Cache_Log::debug( '[Settings] Remove .object_cache.ini due to debug_disable_all' ) ;
887
+ LiteSpeed_Cache_Object::get_instance()->del_file() ;
888
+
889
+ // Set a const to avoid regenerating again
890
  define( 'LITESPEED_DISABLE_OBJECT', true ) ;
891
  }
892
 
inc/activation.class.php CHANGED
@@ -231,6 +231,8 @@ class LiteSpeed_Cache_Activation
231
  return false ;
232
  }
233
 
 
 
234
  copy( LSCWP_DIR . 'includes/advanced-cache.php', $adv_cache_path ) ;
235
  include( $adv_cache_path ) ;
236
  $ret = defined( 'LSCACHE_ADV_CACHE' ) ;
231
  return false ;
232
  }
233
 
234
+ defined( 'LSCWP_LOG' ) && LiteSpeed_Cache_Log::debug( '[Activation] Copying advanced_cache file' ) ;
235
+
236
  copy( LSCWP_DIR . 'includes/advanced-cache.php', $adv_cache_path ) ;
237
  include( $adv_cache_path ) ;
238
  $ret = defined( 'LSCACHE_ADV_CACHE' ) ;
inc/control.class.php CHANGED
@@ -156,6 +156,11 @@ class LiteSpeed_Cache_Control
156
  }
157
  self::$_control |= self::BM_SHARED ;
158
  self::set_private() ;
 
 
 
 
 
159
  if ( $reason ) {
160
  $reason = "( $reason )" ;
161
  }
@@ -186,6 +191,11 @@ class LiteSpeed_Cache_Control
186
  return ;
187
  }
188
  self::$_control |= self::BM_PUBLIC_FORCED ;
 
 
 
 
 
189
  if ( $reason ) {
190
  $reason = "( $reason )" ;
191
  }
@@ -216,6 +226,11 @@ class LiteSpeed_Cache_Control
216
  return ;
217
  }
218
  self::$_control |= self::BM_PRIVATE ;
 
 
 
 
 
219
  if ( $reason ) {
220
  $reason = "( $reason )" ;
221
  }
@@ -263,6 +278,10 @@ class LiteSpeed_Cache_Control
263
  {
264
  self::$_control |= self::BM_FORCED_CACHEABLE ;
265
 
 
 
 
 
266
  if ( $reason ) {
267
  $reason = ' [reason] ' . $reason ;
268
  }
@@ -279,6 +298,11 @@ class LiteSpeed_Cache_Control
279
  public static function set_nocache( $reason = false )
280
  {
281
  self::$_control |= self::BM_NOTCACHEABLE ;
 
 
 
 
 
282
  if ( $reason ) {
283
  $reason = "( $reason )" ;
284
  }
156
  }
157
  self::$_control |= self::BM_SHARED ;
158
  self::set_private() ;
159
+
160
+ if ( ! is_string( $reason ) ) {
161
+ $reason = false ;
162
+ }
163
+
164
  if ( $reason ) {
165
  $reason = "( $reason )" ;
166
  }
191
  return ;
192
  }
193
  self::$_control |= self::BM_PUBLIC_FORCED ;
194
+
195
+ if ( ! is_string( $reason ) ) {
196
+ $reason = false ;
197
+ }
198
+
199
  if ( $reason ) {
200
  $reason = "( $reason )" ;
201
  }
226
  return ;
227
  }
228
  self::$_control |= self::BM_PRIVATE ;
229
+
230
+ if ( ! is_string( $reason ) ) {
231
+ $reason = false ;
232
+ }
233
+
234
  if ( $reason ) {
235
  $reason = "( $reason )" ;
236
  }
278
  {
279
  self::$_control |= self::BM_FORCED_CACHEABLE ;
280
 
281
+ if ( ! is_string( $reason ) ) {
282
+ $reason = false ;
283
+ }
284
+
285
  if ( $reason ) {
286
  $reason = ' [reason] ' . $reason ;
287
  }
298
  public static function set_nocache( $reason = false )
299
  {
300
  self::$_control |= self::BM_NOTCACHEABLE ;
301
+
302
+ if ( ! is_string( $reason ) ) {
303
+ $reason = false ;
304
+ }
305
+
306
  if ( $reason ) {
307
  $reason = "( $reason )" ;
308
  }
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' ;
23
 
24
  const PAGE_EDIT_HTACCESS = 'lscache-edit-htaccess' ;
25
 
@@ -348,6 +348,10 @@ class LiteSpeed_Cache
348
  LiteSpeed_Cache_Admin::redirect() ;
349
  return ;
350
  }
 
 
 
 
351
  }
352
 
353
  /**
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
 
348
  LiteSpeed_Cache_Admin::redirect() ;
349
  return ;
350
  }
351
+
352
+ if ( LiteSpeed_Cache_Router::is_ajax() ) {
353
+ exit ;
354
+ }
355
  }
356
 
357
  /**
inc/object.class.php CHANGED
@@ -25,6 +25,8 @@ class LiteSpeed_Cache_Object
25
  private static $_instance ;
26
 
27
  private $_oc_data_file ;
 
 
28
  private $_conn ;
29
  private $_cfg_enabled ;
30
  private $_cfg_method ;
@@ -54,6 +56,8 @@ class LiteSpeed_Cache_Object
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 ;
@@ -148,43 +152,29 @@ class LiteSpeed_Cache_Object
148
  * @since 1.8
149
  * @access public
150
  */
151
- public function update_file( $keep, $options = false )
152
  {
153
- $wp_file = WP_CONTENT_DIR . '/object-cache.php' ;
154
- $ori_file = LSCWP_DIR . 'lib/object-cache.php' ;
155
-
156
- // To keep file
157
- if ( $keep ) {
158
- // Update data file
159
- $data = "[object_cache]"
160
- . "\nmethod = " . $options[ LiteSpeed_Cache_Config::OPID_CACHE_OBJECT_KIND ]
161
- . "\nhost = " . $options[ LiteSpeed_Cache_Config::OPID_CACHE_OBJECT_HOST ]
162
- . "\nport = " . (int) $options[ LiteSpeed_Cache_Config::OPID_CACHE_OBJECT_PORT ]
163
- . "\nlife = " . $options[ LiteSpeed_Cache_Config::OPID_CACHE_OBJECT_LIFE ]
164
- . "\nuser = '" . $options[ LiteSpeed_Cache_Config::OPID_CACHE_OBJECT_USER ] . "'"
165
- . "\npswd = '" . $options[ LiteSpeed_Cache_Config::OPID_CACHE_OBJECT_PSWD ] . "'"
166
- . "\ndb = " . (int) $options[ LiteSpeed_Cache_Config::OPID_CACHE_OBJECT_DB_ID ]
167
- . "\npersistent = " . ( $options[ LiteSpeed_Cache_Config::OPID_CACHE_OBJECT_PERSISTENT ] ? 1 : 0 )
168
- . "\ncache_admin = " . ( $options[ LiteSpeed_Cache_Config::OPID_CACHE_OBJECT_ADMIN ] ? 1 : 0 )
169
- . "\ncache_transients = " . ( $options[ LiteSpeed_Cache_Config::OPID_CACHE_OBJECT_TRANSIENTS ] ? 1 : 0 )
170
- . "\nglobal_groups = " . implode( ',', explode( "\n", $options[ LiteSpeed_Cache_Config::ITEM_OBJECT_GLOBAL_GROUPS ] ) )
171
- . "\nnon_persistent_groups = " . implode( ',', explode( "\n", $options[ LiteSpeed_Cache_Config::ITEM_OBJECT_NON_PERSISTENT_GROUPS ] ) )
172
- ;
173
- Litespeed_File::save( $this->_oc_data_file, $data ) ;
174
-
175
- // Update cls file
176
- if ( ! file_exists( $wp_file ) || md5_file( $wp_file ) !== md5_file( $ori_file ) ) {
177
- defined( 'LSCWP_LOG' ) && LiteSpeed_Cache_Log::debug( '[Object] copying object-cache.php file to ' . $wp_file ) ;
178
- copy( $ori_file, $wp_file ) ;
179
- }
180
- }
181
- else {
182
- // To delete file
183
- if ( file_exists( $wp_file ) ) {
184
- defined( 'LSCWP_LOG' ) && LiteSpeed_Cache_Log::debug( '[Object] removing ' . $wp_file ) ;
185
- unlink( $wp_file ) ;
186
- }
187
- file_exists( $this->_oc_data_file ) && unlink( $this->_oc_data_file ) ;
188
  }
189
  }
190
 
@@ -196,11 +186,10 @@ class LiteSpeed_Cache_Object
196
  */
197
  public function del_file()
198
  {
199
- $wp_file = WP_CONTENT_DIR . '/object-cache.php' ;
200
- $ori_file = LSCWP_DIR . 'lib/object-cache.php' ;
201
 
202
- if ( file_exists( $wp_file ) && md5_file( $wp_file ) === md5_file( $ori_file ) ) {
203
- unlink( $wp_file ) ;
204
  }
205
 
206
  file_exists( $this->_oc_data_file ) && unlink( $this->_oc_data_file ) ;
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
  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 ;
152
  * @since 1.8
153
  * @access public
154
  */
155
+ public function update_file( $options )
156
  {
157
+ // Update data file
158
+ $data = "[object_cache]"
159
+ . "\nmethod = " . $options[ LiteSpeed_Cache_Config::OPID_CACHE_OBJECT_KIND ]
160
+ . "\nhost = " . $options[ LiteSpeed_Cache_Config::OPID_CACHE_OBJECT_HOST ]
161
+ . "\nport = " . (int) $options[ LiteSpeed_Cache_Config::OPID_CACHE_OBJECT_PORT ]
162
+ . "\nlife = " . $options[ LiteSpeed_Cache_Config::OPID_CACHE_OBJECT_LIFE ]
163
+ . "\nuser = '" . $options[ LiteSpeed_Cache_Config::OPID_CACHE_OBJECT_USER ] . "'"
164
+ . "\npswd = '" . $options[ LiteSpeed_Cache_Config::OPID_CACHE_OBJECT_PSWD ] . "'"
165
+ . "\ndb = " . (int) $options[ LiteSpeed_Cache_Config::OPID_CACHE_OBJECT_DB_ID ]
166
+ . "\npersistent = " . ( $options[ LiteSpeed_Cache_Config::OPID_CACHE_OBJECT_PERSISTENT ] ? 1 : 0 )
167
+ . "\ncache_admin = " . ( $options[ LiteSpeed_Cache_Config::OPID_CACHE_OBJECT_ADMIN ] ? 1 : 0 )
168
+ . "\ncache_transients = " . ( $options[ LiteSpeed_Cache_Config::OPID_CACHE_OBJECT_TRANSIENTS ] ? 1 : 0 )
169
+ . "\nglobal_groups = " . implode( ',', explode( "\n", $options[ LiteSpeed_Cache_Config::ITEM_OBJECT_GLOBAL_GROUPS ] ) )
170
+ . "\nnon_persistent_groups = " . implode( ',', explode( "\n", $options[ LiteSpeed_Cache_Config::ITEM_OBJECT_NON_PERSISTENT_GROUPS ] ) )
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
  */
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 ) ;
inc/purge.class.php CHANGED
@@ -111,7 +111,15 @@ class LiteSpeed_Cache_Purge
111
  $this->_purge_all_object( true ) ;
112
  $this->_purge_all_opcache( true ) ;
113
 
114
- LiteSpeed_Cache_Log::debug( '[Purge] Purge all' . ( $reason ? ' [Reason] ' . $reason : '' ), 3 ) ;
 
 
 
 
 
 
 
 
115
 
116
  $msg = __( 'Purge all caches successfully.', 'litespeed-cache' ) ;
117
  LiteSpeed_Cache_Admin_Display::succeed( $msg ) ;
111
  $this->_purge_all_object( true ) ;
112
  $this->_purge_all_opcache( true ) ;
113
 
114
+ if ( ! is_string( $reason ) ) {
115
+ $reason = false ;
116
+ }
117
+
118
+ if ( $reason ) {
119
+ $reason = "( $reason )" ;
120
+ }
121
+
122
+ LiteSpeed_Cache_Log::debug( '[Purge] Purge all ' . $reason, 3 ) ;
123
 
124
  $msg = __( 'Purge all caches successfully.', 'litespeed-cache' ) ;
125
  LiteSpeed_Cache_Admin_Display::succeed( $msg ) ;
inc/router.class.php CHANGED
@@ -129,6 +129,7 @@ class LiteSpeed_Cache_Router
129
  $frontend = rtrim( ABSPATH, '/' ) ; // /home/user/public_html/frontend
130
  // get home path failed. Trac ticket #37668 (e.g. frontend:/blog backend:/wordpress)
131
  if ( ! $frontend ) {
 
132
  $frontend = parse_url( get_option( 'home' ) ) ;
133
  $frontend = ! empty( $frontend[ 'path' ] ) ? $frontend[ 'path' ] : '' ;
134
  $frontend = $_SERVER[ 'DOCUMENT_ROOT' ] . $frontend ;
129
  $frontend = rtrim( ABSPATH, '/' ) ; // /home/user/public_html/frontend
130
  // get home path failed. Trac ticket #37668 (e.g. frontend:/blog backend:/wordpress)
131
  if ( ! $frontend ) {
132
+ LiteSpeed_Cache_Log::debug( '[Router] No ABSPATH, generating from home option' ) ;
133
  $frontend = parse_url( get_option( 'home' ) ) ;
134
  $frontend = ! empty( $frontend[ 'path' ] ) ? $frontend[ 'path' ] : '' ;
135
  $frontend = $_SERVER[ 'DOCUMENT_ROOT' ] . $frontend ;
includes/litespeed-cache-activation.class.php CHANGED
@@ -231,6 +231,8 @@ class LiteSpeed_Cache_Activation
231
  return false ;
232
  }
233
 
 
 
234
  copy( LSCWP_DIR . 'includes/advanced-cache.php', $adv_cache_path ) ;
235
  include( $adv_cache_path ) ;
236
  $ret = defined( 'LSCACHE_ADV_CACHE' ) ;
231
  return false ;
232
  }
233
 
234
+ defined( 'LSCWP_LOG' ) && LiteSpeed_Cache_Log::debug( '[Activation] Copying advanced_cache file' ) ;
235
+
236
  copy( LSCWP_DIR . 'includes/advanced-cache.php', $adv_cache_path ) ;
237
  include( $adv_cache_path ) ;
238
  $ret = defined( 'LSCACHE_ADV_CACHE' ) ;
includes/litespeed-cache-control.class.php CHANGED
@@ -156,6 +156,11 @@ class LiteSpeed_Cache_Control
156
  }
157
  self::$_control |= self::BM_SHARED ;
158
  self::set_private() ;
 
 
 
 
 
159
  if ( $reason ) {
160
  $reason = "( $reason )" ;
161
  }
@@ -186,6 +191,11 @@ class LiteSpeed_Cache_Control
186
  return ;
187
  }
188
  self::$_control |= self::BM_PUBLIC_FORCED ;
 
 
 
 
 
189
  if ( $reason ) {
190
  $reason = "( $reason )" ;
191
  }
@@ -216,6 +226,11 @@ class LiteSpeed_Cache_Control
216
  return ;
217
  }
218
  self::$_control |= self::BM_PRIVATE ;
 
 
 
 
 
219
  if ( $reason ) {
220
  $reason = "( $reason )" ;
221
  }
@@ -263,6 +278,10 @@ class LiteSpeed_Cache_Control
263
  {
264
  self::$_control |= self::BM_FORCED_CACHEABLE ;
265
 
 
 
 
 
266
  if ( $reason ) {
267
  $reason = ' [reason] ' . $reason ;
268
  }
@@ -279,6 +298,11 @@ class LiteSpeed_Cache_Control
279
  public static function set_nocache( $reason = false )
280
  {
281
  self::$_control |= self::BM_NOTCACHEABLE ;
 
 
 
 
 
282
  if ( $reason ) {
283
  $reason = "( $reason )" ;
284
  }
156
  }
157
  self::$_control |= self::BM_SHARED ;
158
  self::set_private() ;
159
+
160
+ if ( ! is_string( $reason ) ) {
161
+ $reason = false ;
162
+ }
163
+
164
  if ( $reason ) {
165
  $reason = "( $reason )" ;
166
  }
191
  return ;
192
  }
193
  self::$_control |= self::BM_PUBLIC_FORCED ;
194
+
195
+ if ( ! is_string( $reason ) ) {
196
+ $reason = false ;
197
+ }
198
+
199
  if ( $reason ) {
200
  $reason = "( $reason )" ;
201
  }
226
  return ;
227
  }
228
  self::$_control |= self::BM_PRIVATE ;
229
+
230
+ if ( ! is_string( $reason ) ) {
231
+ $reason = false ;
232
+ }
233
+
234
  if ( $reason ) {
235
  $reason = "( $reason )" ;
236
  }
278
  {
279
  self::$_control |= self::BM_FORCED_CACHEABLE ;
280
 
281
+ if ( ! is_string( $reason ) ) {
282
+ $reason = false ;
283
+ }
284
+
285
  if ( $reason ) {
286
  $reason = ' [reason] ' . $reason ;
287
  }
298
  public static function set_nocache( $reason = false )
299
  {
300
  self::$_control |= self::BM_NOTCACHEABLE ;
301
+
302
+ if ( ! is_string( $reason ) ) {
303
+ $reason = false ;
304
+ }
305
+
306
  if ( $reason ) {
307
  $reason = "( $reason )" ;
308
  }
includes/litespeed-cache-purge.class.php CHANGED
@@ -111,7 +111,15 @@ class LiteSpeed_Cache_Purge
111
  $this->_purge_all_object( true ) ;
112
  $this->_purge_all_opcache( true ) ;
113
 
114
- LiteSpeed_Cache_Log::debug( '[Purge] Purge all' . ( $reason ? ' [Reason] ' . $reason : '' ), 3 ) ;
 
 
 
 
 
 
 
 
115
 
116
  $msg = __( 'Purge all caches successfully.', 'litespeed-cache' ) ;
117
  LiteSpeed_Cache_Admin_Display::succeed( $msg ) ;
111
  $this->_purge_all_object( true ) ;
112
  $this->_purge_all_opcache( true ) ;
113
 
114
+ if ( ! is_string( $reason ) ) {
115
+ $reason = false ;
116
+ }
117
+
118
+ if ( $reason ) {
119
+ $reason = "( $reason )" ;
120
+ }
121
+
122
+ LiteSpeed_Cache_Log::debug( '[Purge] Purge all ' . $reason, 3 ) ;
123
 
124
  $msg = __( 'Purge all caches successfully.', 'litespeed-cache' ) ;
125
  LiteSpeed_Cache_Admin_Display::succeed( $msg ) ;
includes/litespeed-cache-router.class.php CHANGED
@@ -129,6 +129,7 @@ class LiteSpeed_Cache_Router
129
  $frontend = rtrim( ABSPATH, '/' ) ; // /home/user/public_html/frontend
130
  // get home path failed. Trac ticket #37668 (e.g. frontend:/blog backend:/wordpress)
131
  if ( ! $frontend ) {
 
132
  $frontend = parse_url( get_option( 'home' ) ) ;
133
  $frontend = ! empty( $frontend[ 'path' ] ) ? $frontend[ 'path' ] : '' ;
134
  $frontend = $_SERVER[ 'DOCUMENT_ROOT' ] . $frontend ;
129
  $frontend = rtrim( ABSPATH, '/' ) ; // /home/user/public_html/frontend
130
  // get home path failed. Trac ticket #37668 (e.g. frontend:/blog backend:/wordpress)
131
  if ( ! $frontend ) {
132
+ LiteSpeed_Cache_Log::debug( '[Router] No ABSPATH, generating from home option' ) ;
133
  $frontend = parse_url( get_option( 'home' ) ) ;
134
  $frontend = ! empty( $frontend[ 'path' ] ) ? $frontend[ 'path' ] : '' ;
135
  $frontend = $_SERVER[ 'DOCUMENT_ROOT' ] . $frontend ;
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' ;
23
 
24
  const PAGE_EDIT_HTACCESS = 'lscache-edit-htaccess' ;
25
 
@@ -348,6 +348,10 @@ class LiteSpeed_Cache
348
  LiteSpeed_Cache_Admin::redirect() ;
349
  return ;
350
  }
 
 
 
 
351
  }
352
 
353
  /**
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
 
348
  LiteSpeed_Cache_Admin::redirect() ;
349
  return ;
350
  }
351
+
352
+ if ( LiteSpeed_Cache_Router::is_ajax() ) {
353
+ exit ;
354
+ }
355
  }
356
 
357
  /**
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
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.1
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
7
  License: GPLv3
8
  License URI: http://www.gnu.org/licenses/gpl.html
9
 
@@ -252,6 +252,11 @@ Click on the `Advanced View` link at the top of the page, and several more tabs
252
 
253
  == Changelog ==
254
 
 
 
 
 
 
255
  = 2.2 - Apr 2 2018 =
256
  * [NEW FEATURE] <strong>Debug</strong> Disable All Features setting in Debug tab. (@monarobase)
257
  * [NEW FEATURE] <strong>Cache</strong> Force Cacheable URIs setting in Excludes tab.
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
 
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.
258
+ * [BUGFIX] CLI no longer shows 400 error upon successful result.
259
+
260
  = 2.2 - Apr 2 2018 =
261
  * [NEW FEATURE] <strong>Debug</strong> Disable All Features setting in Debug tab. (@monarobase)
262
  * [NEW FEATURE] <strong>Cache</strong> Force Cacheable URIs setting in Excludes tab.