LiteSpeed Cache - Version 2.2.7

Version Description

  • Jun 4 2018 =
  • [IMPROVEMENT] Improved redirection for manual image pull to avoid too many redirections warning.
  • [IAPI] Increased credit limit.
  • [BUGFIX] Fixed 503 error when enabling log filters in Debug tab. (#525206)
  • [UPDATE] Improve compatibility when using sitemap url on servers with allow_url_open off.
  • [UPDATE] Removed Crawler HTTP2 option due to causing no-cache blacklist issue for certain environments.
  • [UPDATE] Privacy policy can be now translated. (@Josemi)
  • [UPDATE] IAPI Increased default img request max to 3000.
Download this release

Release Info

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

Code changes from version 2.2.6 to 2.2.7

admin/litespeed-cache-admin-settings.class.php CHANGED
@@ -917,7 +917,6 @@ class LiteSpeed_Cache_Admin_Settings
917
LiteSpeed_Cache_Config::CRWL_PAGES,
918
LiteSpeed_Cache_Config::CRWL_CATS,
919
LiteSpeed_Cache_Config::CRWL_TAGS,
920
- LiteSpeed_Cache_Config::CRWL_HTTP2,
921
) ;
922
foreach ( $ids as $id ) {
923
$this->_options[ $id ] = self::parse_onoff( $this->_input, $id ) ;
917
LiteSpeed_Cache_Config::CRWL_PAGES,
918
LiteSpeed_Cache_Config::CRWL_CATS,
919
LiteSpeed_Cache_Config::CRWL_TAGS,
920
) ;
921
foreach ( $ids as $id ) {
922
$this->_options[ $id ] = self::parse_onoff( $this->_input, $id ) ;
admin/litespeed-cache-admin.class.php CHANGED
@@ -99,7 +99,7 @@ class LiteSpeed_Cache_Admin
99
// Add privacy policy
100
// @since 2.2.6
101
if ( function_exists( 'wp_add_privacy_policy_content' ) ) {
102
- wp_add_privacy_policy_content( LiteSpeed_Cache::PLUGIN_NAME, Litespeed_File::read( LSCWP_DIR . 'doc/privacy_policy.html' ) ) ;
103
}
104
105
do_action( 'litspeed_after_admin_init' ) ;
99
// Add privacy policy
100
// @since 2.2.6
101
if ( function_exists( 'wp_add_privacy_policy_content' ) ) {
102
+ wp_add_privacy_policy_content( LiteSpeed_Cache::PLUGIN_NAME, LiteSpeed_Cache_Doc::privacy_policy() ) ;
103
}
104
105
do_action( 'litspeed_after_admin_init' ) ;
admin/tpl/image_optimization.php CHANGED
@@ -323,7 +323,7 @@ LiteSpeed_Cache_GUI::show_promo() ;
323
<?php endif ; ?>
324
325
<br />
326
- <a href="<?php echo LiteSpeed_Cache_Utility::build_url( LiteSpeed_Cache::ACTION_IMG_OPTM, LiteSpeed_Cache_Img_Optm::TYPE_RM_BKUP ) ; ?>" data-litespeed-cfm="<?php echo __( 'Are you sure to remove all image bakcups?', 'litespeed-cache' ) ; ?>" class="litespeed-btn-danger">
327
<?php echo __( 'Remove Original Image Backups', 'litespeed-cache' ) ; ?>
328
</a>
329
<span class="litespeed-desc">
323
<?php endif ; ?>
324
325
<br />
326
+ <a href="<?php echo LiteSpeed_Cache_Utility::build_url( LiteSpeed_Cache::ACTION_IMG_OPTM, LiteSpeed_Cache_Img_Optm::TYPE_RM_BKUP ) ; ?>" data-litespeed-cfm="<?php echo __( 'Are you sure to remove all image backups?', 'litespeed-cache' ) ; ?>" class="litespeed-btn-danger">
327
<?php echo __( 'Remove Original Image Backups', 'litespeed-cache' ) ; ?>
328
</a>
329
<span class="litespeed-desc">
admin/tpl/setting/settings_crawler.php CHANGED
@@ -135,22 +135,6 @@ if ( !defined('WPINC') ) die;
135
</td>
136
</tr>
137
138
- <tr>
139
- <th><?php echo __( 'HTTP/2 Crawl', 'litespeed-cache' ) ; ?></th>
140
- <td>
141
- <?php $this->build_switch( LiteSpeed_Cache_Config::CRWL_HTTP2 ) ; ?>
142
- <div class="litespeed-desc">
143
- <?php echo __( 'Crawl using the HTTP/2 protocal.', 'litespeed-cache' ) ; ?>
144
- <?php echo __( 'Current curl HTTP/2 extension status', 'litespeed-cache' ) ; ?>:
145
- <?php if ( defined( 'CURL_HTTP_VERSION_2' ) ) : ?>
146
- <font class="litespeed-warning"><?php echo __( 'Enabled', 'litespeed-cache' ) ; ?></font>
147
- <?php else : ?>
148
- <font class="litespeed-warning"><?php echo __( 'Disabled', 'litespeed-cache' ) ; ?></font>
149
- <?php endif ; ?>
150
- </div>
151
- </td>
152
- </tr>
153
-
154
<tr>
155
<th><?php echo __('Custom Sitemap', 'litespeed-cache'); ?></th>
156
<td>
135
</td>
136
</tr>
137
138
<tr>
139
<th><?php echo __('Custom Sitemap', 'litespeed-cache'); ?></th>
140
<td>
admin/tpl/setting/settings_debug.php CHANGED
@@ -101,7 +101,10 @@ if ( ! defined( 'WPINC' ) ) die ;
101
<td>
102
<?php $this->build_switch( LiteSpeed_Cache_Config::OPID_HEARTBEAT ) ; ?>
103
<div class="litespeed-desc">
104
- <?php echo __( 'Disable WordPress heartbeat to prevent AJAX calls from breaking debug logging. WARNING: Disabling this may cause WordPress tasks triggered by AJAX to stop working.', 'litespeed-cache' ) ; ?>
105
</div>
106
</td>
107
</tr>
@@ -131,7 +134,10 @@ if ( ! defined( 'WPINC' ) ) die ;
131
<td>
132
<?php $this->build_switch( LiteSpeed_Cache_Config::OPID_LOG_FILTERS ) ; ?>
133
<div class="litespeed-desc">
134
- <?php echo __( 'Log all WordPress filter hooks. WARNING: Enabling this option will cause log file size to grow quickly.', 'litespeed-cache' ) ; ?>
135
</div>
136
</td>
137
</tr>
101
<td>
102
<?php $this->build_switch( LiteSpeed_Cache_Config::OPID_HEARTBEAT ) ; ?>
103
<div class="litespeed-desc">
104
+ <?php echo __( 'Disable WordPress heartbeat to prevent AJAX calls from breaking debug logging.', 'litespeed-cache' ) ; ?>
105
+ <font class="litespeed-warning"><?php echo __( 'WARNING', 'litespeed-cache' ) ; ?>:
106
+ <?php echo __( 'Disabling this may cause WordPress tasks triggered by AJAX to stop working.', 'litespeed-cache' ) ; ?>
107
+ </font>
108
</div>
109
</td>
110
</tr>
134
<td>
135
<?php $this->build_switch( LiteSpeed_Cache_Config::OPID_LOG_FILTERS ) ; ?>
136
<div class="litespeed-desc">
137
+ <?php echo __( 'Log all WordPress filter hooks.', 'litespeed-cache' ) ; ?>
138
+ <font class="litespeed-warning"><?php echo __( 'WARNING', 'litespeed-cache' ) ; ?>:
139
+ <?php echo __( 'Enabling this option will cause log file size to grow quickly.', 'litespeed-cache' ) ; ?>
140
+ </font>
141
</div>
142
</td>
143
</tr>
cli/litespeed-cache-cli-admin.class.php CHANGED
@@ -31,7 +31,6 @@ class LiteSpeed_Cache_Cli_Admin
31
LiteSpeed_Cache_Config::CRWL_PAGES,
32
LiteSpeed_Cache_Config::CRWL_CATS,
33
LiteSpeed_Cache_Config::CRWL_TAGS,
34
- LiteSpeed_Cache_Config::CRWL_HTTP2,
35
LiteSpeed_Cache_Config::CRWL_CRON_ACTIVE,
36
LiteSpeed_Cache_Config::OPID_DEBUG_DISABLE_ALL,
37
LiteSpeed_Cache_Config::OPID_DEBUG_LEVEL,
@@ -147,7 +146,6 @@ class LiteSpeed_Cache_Cli_Admin
147
case LiteSpeed_Cache_Config::CRWL_PAGES:
148
case LiteSpeed_Cache_Config::CRWL_CATS:
149
case LiteSpeed_Cache_Config::CRWL_TAGS:
150
- case LiteSpeed_Cache_Config::CRWL_HTTP2:
151
case LiteSpeed_Cache_Config::CRWL_CRON_ACTIVE:
152
case LiteSpeed_Cache_Config::OPID_DEBUG_DISABLE_ALL:
153
case LiteSpeed_Cache_Config::OPID_DEBUG_LEVEL:
31
LiteSpeed_Cache_Config::CRWL_PAGES,
32
LiteSpeed_Cache_Config::CRWL_CATS,
33
LiteSpeed_Cache_Config::CRWL_TAGS,
34
LiteSpeed_Cache_Config::CRWL_CRON_ACTIVE,
35
LiteSpeed_Cache_Config::OPID_DEBUG_DISABLE_ALL,
36
LiteSpeed_Cache_Config::OPID_DEBUG_LEVEL,
146
case LiteSpeed_Cache_Config::CRWL_PAGES:
147
case LiteSpeed_Cache_Config::CRWL_CATS:
148
case LiteSpeed_Cache_Config::CRWL_TAGS:
149
case LiteSpeed_Cache_Config::CRWL_CRON_ACTIVE:
150
case LiteSpeed_Cache_Config::OPID_DEBUG_DISABLE_ALL:
151
case LiteSpeed_Cache_Config::OPID_DEBUG_LEVEL:
doc/privacy_policy.html DELETED
@@ -1 +0,0 @@
1
- This site utilizes caching in order to facilitate a faster response time and better user experience. Caching potentially stores a duplicate copy of every web page that is on display on this site. All cache files are temporary, and are never accessed by any third party, except as necessary to obtain technical support from the cache plugin vendor. Cache files expire on a schedule set by the site administrator, but may easily be purged by the admin before their natural expiration, if necessary.
inc/config.class.php CHANGED
@@ -207,7 +207,6 @@ class LiteSpeed_Cache_Config
207
const CRWL_LOAD_LIMIT = 'crawler_load_limit' ;
208
const CRWL_DOMAIN_IP = 'crawler_domain_ip' ;
209
const CRWL_CUSTOM_SITEMAP = 'crawler_custom_sitemap' ;
210
- const CRWL_HTTP2 = 'crawler_http2' ;
211
212
const CRWL_CRON_ACTIVE = 'crawler_cron_active' ;
213
@@ -740,7 +739,6 @@ class LiteSpeed_Cache_Config
740
self::CRWL_DOMAIN_IP => '',
741
self::CRWL_CUSTOM_SITEMAP => '',
742
self::CRWL_CRON_ACTIVE => false,
743
- self::CRWL_HTTP2 => false,
744
) ;
745
746
if ( LSWCP_ESI_SUPPORT ) {
207
const CRWL_LOAD_LIMIT = 'crawler_load_limit' ;
208
const CRWL_DOMAIN_IP = 'crawler_domain_ip' ;
209
const CRWL_CUSTOM_SITEMAP = 'crawler_custom_sitemap' ;
210
211
const CRWL_CRON_ACTIVE = 'crawler_cron_active' ;
212
739
self::CRWL_DOMAIN_IP => '',
740
self::CRWL_CUSTOM_SITEMAP => '',
741
self::CRWL_CRON_ACTIVE => false,
742
) ;
743
744
if ( LSWCP_ESI_SUPPORT ) {
inc/crawler.class.php CHANGED
@@ -175,10 +175,18 @@ class LiteSpeed_Cache_Crawler
175
*/
176
public function parse_custom_sitemap($sitemap, $return_detail = true)
177
{
178
- if ( ! file_get_contents($sitemap) ) {
179
return LiteSpeed_Cache_Admin_Error::E_SETTING_CUSTOM_SITEMAP_READ ;
180
}
181
- $xml_object = simplexml_load_file($sitemap) ;
182
if ( ! $xml_object ) {
183
return LiteSpeed_Cache_Admin_Error::E_SETTING_CUSTOM_SITEMAP_PARSE ;
184
}
@@ -384,8 +392,6 @@ class LiteSpeed_Cache_Crawler
384
$crawler->set_base_url($this->_home_url) ;
385
$crawler->set_run_duration($options[LiteSpeed_Cache_Config::CRWL_RUN_DURATION]) ;
386
387
- $crawler->set_http2( $options[ LiteSpeed_Cache_Config::CRWL_HTTP2 ] ) ;
388
-
389
/**
390
* Limit delay to use server setting
391
* @since 1.8.3
175
*/
176
public function parse_custom_sitemap($sitemap, $return_detail = true)
177
{
178
+ /**
179
+ * Read via wp func to avoid allow_url_fopen = off
180
+ * @since 2.2.7
181
+ */
182
+ $response = wp_remote_get( $sitemap, array( 'timeout' => 15 ) ) ;
183
+ if ( is_wp_error( $response ) ) {
184
+ $error_message = $response->get_error_message() ;
185
+ LiteSpeed_Cache_Log::debug( '[Crawler] failed to read sitemap: ' . $error_message ) ;
186
return LiteSpeed_Cache_Admin_Error::E_SETTING_CUSTOM_SITEMAP_READ ;
187
}
188
+
189
+ $xml_object = simplexml_load_string( $response[ 'body' ] ) ;
190
if ( ! $xml_object ) {
191
return LiteSpeed_Cache_Admin_Error::E_SETTING_CUSTOM_SITEMAP_PARSE ;
192
}
392
$crawler->set_base_url($this->_home_url) ;
393
$crawler->set_run_duration($options[LiteSpeed_Cache_Config::CRWL_RUN_DURATION]) ;
394
395
/**
396
* Limit delay to use server setting
397
* @since 1.8.3
inc/doc.cls.php ADDED
@@ -0,0 +1,27 @@
1
+ <?php
2
+
3
+ /**
4
+ * The Doc class.
5
+ *
6
+ * @since 2.2.7
7
+ * @package LiteSpeed_Cache
8
+ * @subpackage LiteSpeed_Cache/inc
9
+ * @author LiteSpeed Technologies <info@litespeedtech.com>
10
+ */
11
+
12
+ class LiteSpeed_Cache_Doc
13
+ {
14
+ // private static $_instance ;
15
+
16
+ /**
17
+ * Privacy policy
18
+ *
19
+ * @since 2.2.7
20
+ * @access public
21
+ */
22
+ public static function privacy_policy()
23
+ {
24
+ return __( 'This site utilizes caching in order to facilitate a faster response time and better user experience. Caching potentially stores a duplicate copy of every web page that is on display on this site. All cache files are temporary, and are never accessed by any third party, except as necessary to obtain technical support from the cache plugin vendor. Cache files expire on a schedule set by the site administrator, but may easily be purged by the admin before their natural expiration, if necessary.', 'litespeed-cache' ) ;
25
+ }
26
+
27
+ }
inc/img_optm.class.php CHANGED
@@ -134,7 +134,7 @@ class LiteSpeed_Cache_Img_Optm
134
ORDER BY a.ID DESC
135
LIMIT %d
136
" ;
137
- $q = $wpdb->prepare( $q, apply_filters( 'litespeed_img_optimize_max_rows', 500 ) ) ;
138
139
$img_set = array() ;
140
$list = $wpdb->get_results( $q ) ;
@@ -1757,7 +1757,12 @@ class LiteSpeed_Cache_Img_Optm
1757
// Check if need to self redirect
1758
if ( $result === 'to_be_continued' ) {
1759
$link = LiteSpeed_Cache_Utility::build_url( LiteSpeed_Cache::ACTION_IMG_OPTM, LiteSpeed_Cache_Img_Optm::TYPE_IMG_PULL ) ;
1760
- LiteSpeed_Cache_Admin::redirect( html_entity_decode( $link ) ) ;
1761
}
1762
break ;
1763
134
ORDER BY a.ID DESC
135
LIMIT %d
136
" ;
137
+ $q = $wpdb->prepare( $q, apply_filters( 'litespeed_img_optimize_max_rows', 3000 ) ) ;
138
139
$img_set = array() ;
140
$list = $wpdb->get_results( $q ) ;
1757
// Check if need to self redirect
1758
if ( $result === 'to_be_continued' ) {
1759
$link = LiteSpeed_Cache_Utility::build_url( LiteSpeed_Cache::ACTION_IMG_OPTM, LiteSpeed_Cache_Img_Optm::TYPE_IMG_PULL ) ;
1760
+ // Add i to avoid browser too many redirected warning
1761
+ $i = ! empty( $_GET[ 'i' ] ) ? $_GET[ 'i' ] : 0 ;
1762
+ $i ++ ;
1763
+ $url = html_entity_decode( $link ) . '&i=' . $i ;
1764
+ exit( "<meta http-equiv='refresh' content='0;url=$url'>" ) ;
1765
+ // LiteSpeed_Cache_Admin::redirect( $url ) ;
1766
}
1767
break ;
1768
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.6' ;
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.7' ;
23
24
const PAGE_EDIT_HTACCESS = 'lscache-edit-htaccess' ;
25
inc/litespeed.autoload.php CHANGED
@@ -33,6 +33,7 @@ if ( !function_exists('_litespeed_autoload') ) {
33
'LiteSpeed_Cache_Crawler' => 'inc/crawler.class.php',
34
'LiteSpeed_Cache_Crawler_Sitemap' => 'inc/crawler-sitemap.class.php',
35
'LiteSpeed_Cache_Data' => 'inc/data.class.php',
36
'LiteSpeed_Cache_ESI' => 'inc/esi.class.php',
37
'LiteSpeed_Cache_GUI' => 'inc/gui.class.php',
38
'LiteSpeed_Cache_Import' => 'inc/import.class.php',
33
'LiteSpeed_Cache_Crawler' => 'inc/crawler.class.php',
34
'LiteSpeed_Cache_Crawler_Sitemap' => 'inc/crawler-sitemap.class.php',
35
'LiteSpeed_Cache_Data' => 'inc/data.class.php',
36
+ 'LiteSpeed_Cache_Doc' => 'inc/doc.cls.php',
37
'LiteSpeed_Cache_ESI' => 'inc/esi.class.php',
38
'LiteSpeed_Cache_GUI' => 'inc/gui.class.php',
39
'LiteSpeed_Cache_Import' => 'inc/import.class.php',
inc/log.class.php CHANGED
@@ -16,6 +16,9 @@ class LiteSpeed_Cache_Log
16
private static $log_path ;
17
private static $_prefix ;
18
19
const TYPE_CLEAR_LOG = 'clear_log' ;
20
21
/**
@@ -104,6 +107,9 @@ class LiteSpeed_Cache_Log
104
105
// Check if hook filters
106
if ( LiteSpeed_Cache::config( LiteSpeed_Cache_Config::OPID_LOG_FILTERS ) ) {
107
add_action( 'all', 'LiteSpeed_Cache_Log::log_filters' ) ;
108
}
109
}
@@ -117,16 +123,13 @@ class LiteSpeed_Cache_Log
117
public static function log_filters()
118
{
119
$action = current_filter() ;
120
- if ( $ignore_filters = get_option( LiteSpeed_Cache_Config::ITEM_LOG_IGNORE_FILTERS ) ) {
121
- $ignore_filters = explode( "\n", $ignore_filters ) ;
122
- if ( in_array( $action, $ignore_filters ) ) {
123
- return ;
124
- }
125
}
126
127
- if ( $ignore_part_filters = get_option( LiteSpeed_Cache_Config::ITEM_LOG_IGNORE_PART_FILTERS ) ) {
128
- $ignore_part_filters = explode( "\n", $ignore_part_filters ) ;
129
- foreach ( $ignore_part_filters as $val ) {
130
if ( stripos( $action, $val ) !== false ) {
131
return ;
132
}
@@ -280,12 +283,16 @@ class LiteSpeed_Cache_Log
280
'HTTP_COOKIE' => '',
281
'X-LSCACHE' => '',
282
'LSCACHE_VARY_COOKIE' => '',
283
- 'LSCACHE_VARY_VALUE' => ''
284
) ;
285
$server = array_merge( $servervars, $_SERVER ) ;
286
$params = array() ;
287
288
- $param = sprintf( '%s %s %s', $server['REQUEST_METHOD'], $server['SERVER_PROTOCOL'], strtok( $server['REQUEST_URI'], '?' ) ) ;
289
290
$qs = ! empty( $server['QUERY_STRING'] ) ? $server['QUERY_STRING'] : '' ;
291
if ( LiteSpeed_Cache::config( LiteSpeed_Cache_Config::OPID_COLLAPS_QS ) ) {
16
private static $log_path ;
17
private static $_prefix ;
18
19
+ private static $_ignore_filters ;
20
+ private static $_ignore_part_filters ;
21
+
22
const TYPE_CLEAR_LOG = 'clear_log' ;
23
24
/**
107
108
// Check if hook filters
109
if ( LiteSpeed_Cache::config( LiteSpeed_Cache_Config::OPID_LOG_FILTERS ) ) {
110
+ self::$_ignore_filters = LiteSpeed_Cache_Config::get_instance()->get_item( LiteSpeed_Cache_Config::ITEM_LOG_IGNORE_FILTERS ) ;
111
+ self::$_ignore_part_filters = LiteSpeed_Cache_Config::get_instance()->get_item( LiteSpeed_Cache_Config::ITEM_LOG_IGNORE_PART_FILTERS ) ;
112
+
113
add_action( 'all', 'LiteSpeed_Cache_Log::log_filters' ) ;
114
}
115
}
123
public static function log_filters()
124
{
125
$action = current_filter() ;
126
+
127
+ if ( self::$_ignore_filters && in_array( $action, self::$_ignore_filters ) ) {
128
+ return ;
129
}
130
131
+ if ( self::$_ignore_part_filters ) {
132
+ foreach ( self::$_ignore_part_filters as $val ) {
133
if ( stripos( $action, $val ) !== false ) {
134
return ;
135
}
283
'HTTP_COOKIE' => '',
284
'X-LSCACHE' => '',
285
'LSCACHE_VARY_COOKIE' => '',
286
+ 'LSCACHE_VARY_VALUE' => '',
287
) ;
288
$server = array_merge( $servervars, $_SERVER ) ;
289
$params = array() ;
290
291
+ if ( isset( $_SERVER[ 'HTTPS' ] ) && $_SERVER[ 'HTTPS' ] == 'on' ) {
292
+ $server['SERVER_PROTOCOL'] .= ' (HTTPS) ' ;
293
+ }
294
+
295
+ $param = sprintf( '------%s %s %s', $server['REQUEST_METHOD'], $server['SERVER_PROTOCOL'], strtok( $server['REQUEST_URI'], '?' ) ) ;
296
297
$qs = ! empty( $server['QUERY_STRING'] ) ? $server['QUERY_STRING'] : '' ;
298
if ( LiteSpeed_Cache::config( LiteSpeed_Cache_Config::OPID_COLLAPS_QS ) ) {
inc/purge.class.php CHANGED
@@ -281,7 +281,7 @@ class LiteSpeed_Cache_Purge
281
}
282
283
$this->_pub_purge = array_merge( $this->_pub_purge, $tags ) ;
284
- LiteSpeed_Cache_Log::debug( '[Purge] added ' . implode( ',', $tags ), 3 ) ;
285
286
// Send purge header immediately
287
$curr_built = $this->_build() ;
281
}
282
283
$this->_pub_purge = array_merge( $this->_pub_purge, $tags ) ;
284
+ LiteSpeed_Cache_Log::debug( '[Purge] added ' . implode( ',', $tags ), 8 ) ;
285
286
// Send purge header immediately
287
$curr_built = $this->_build() ;
includes/litespeed-cache-config.class.php CHANGED
@@ -207,7 +207,6 @@ class LiteSpeed_Cache_Config
207
const CRWL_LOAD_LIMIT = 'crawler_load_limit' ;
208
const CRWL_DOMAIN_IP = 'crawler_domain_ip' ;
209
const CRWL_CUSTOM_SITEMAP = 'crawler_custom_sitemap' ;
210
- const CRWL_HTTP2 = 'crawler_http2' ;
211
212
const CRWL_CRON_ACTIVE = 'crawler_cron_active' ;
213
@@ -740,7 +739,6 @@ class LiteSpeed_Cache_Config
740
self::CRWL_DOMAIN_IP => '',
741
self::CRWL_CUSTOM_SITEMAP => '',
742
self::CRWL_CRON_ACTIVE => false,
743
- self::CRWL_HTTP2 => false,
744
) ;
745
746
if ( LSWCP_ESI_SUPPORT ) {
207
const CRWL_LOAD_LIMIT = 'crawler_load_limit' ;
208
const CRWL_DOMAIN_IP = 'crawler_domain_ip' ;
209
const CRWL_CUSTOM_SITEMAP = 'crawler_custom_sitemap' ;
210
211
const CRWL_CRON_ACTIVE = 'crawler_cron_active' ;
212
739
self::CRWL_DOMAIN_IP => '',
740
self::CRWL_CUSTOM_SITEMAP => '',
741
self::CRWL_CRON_ACTIVE => false,
742
) ;
743
744
if ( LSWCP_ESI_SUPPORT ) {
includes/litespeed-cache-crawler.class.php CHANGED
@@ -175,10 +175,18 @@ class LiteSpeed_Cache_Crawler
175
*/
176
public function parse_custom_sitemap($sitemap, $return_detail = true)
177
{
178
- if ( ! file_get_contents($sitemap) ) {
179
return LiteSpeed_Cache_Admin_Error::E_SETTING_CUSTOM_SITEMAP_READ ;
180
}
181
- $xml_object = simplexml_load_file($sitemap) ;
182
if ( ! $xml_object ) {
183
return LiteSpeed_Cache_Admin_Error::E_SETTING_CUSTOM_SITEMAP_PARSE ;
184
}
@@ -384,8 +392,6 @@ class LiteSpeed_Cache_Crawler
384
$crawler->set_base_url($this->_home_url) ;
385
$crawler->set_run_duration($options[LiteSpeed_Cache_Config::CRWL_RUN_DURATION]) ;
386
387
- $crawler->set_http2( $options[ LiteSpeed_Cache_Config::CRWL_HTTP2 ] ) ;
388
-
389
/**
390
* Limit delay to use server setting
391
* @since 1.8.3
175
*/
176
public function parse_custom_sitemap($sitemap, $return_detail = true)
177
{
178
+ /**
179
+ * Read via wp func to avoid allow_url_fopen = off
180
+ * @since 2.2.7
181
+ */
182
+ $response = wp_remote_get( $sitemap, array( 'timeout' => 15 ) ) ;
183
+ if ( is_wp_error( $response ) ) {
184
+ $error_message = $response->get_error_message() ;
185
+ LiteSpeed_Cache_Log::debug( '[Crawler] failed to read sitemap: ' . $error_message ) ;
186
return LiteSpeed_Cache_Admin_Error::E_SETTING_CUSTOM_SITEMAP_READ ;
187
}
188
+
189
+ $xml_object = simplexml_load_string( $response[ 'body' ] ) ;
190
if ( ! $xml_object ) {
191
return LiteSpeed_Cache_Admin_Error::E_SETTING_CUSTOM_SITEMAP_PARSE ;
192
}
392
$crawler->set_base_url($this->_home_url) ;
393
$crawler->set_run_duration($options[LiteSpeed_Cache_Config::CRWL_RUN_DURATION]) ;
394
395
/**
396
* Limit delay to use server setting
397
* @since 1.8.3
includes/litespeed-cache-log.class.php CHANGED
@@ -16,6 +16,9 @@ class LiteSpeed_Cache_Log
16
private static $log_path ;
17
private static $_prefix ;
18
19
const TYPE_CLEAR_LOG = 'clear_log' ;
20
21
/**
@@ -104,6 +107,9 @@ class LiteSpeed_Cache_Log
104
105
// Check if hook filters
106
if ( LiteSpeed_Cache::config( LiteSpeed_Cache_Config::OPID_LOG_FILTERS ) ) {
107
add_action( 'all', 'LiteSpeed_Cache_Log::log_filters' ) ;
108
}
109
}
@@ -117,16 +123,13 @@ class LiteSpeed_Cache_Log
117
public static function log_filters()
118
{
119
$action = current_filter() ;
120
- if ( $ignore_filters = get_option( LiteSpeed_Cache_Config::ITEM_LOG_IGNORE_FILTERS ) ) {
121
- $ignore_filters = explode( "\n", $ignore_filters ) ;
122
- if ( in_array( $action, $ignore_filters ) ) {
123
- return ;
124
- }
125
}
126
127
- if ( $ignore_part_filters = get_option( LiteSpeed_Cache_Config::ITEM_LOG_IGNORE_PART_FILTERS ) ) {
128
- $ignore_part_filters = explode( "\n", $ignore_part_filters ) ;
129
- foreach ( $ignore_part_filters as $val ) {
130
if ( stripos( $action, $val ) !== false ) {
131
return ;
132
}
@@ -280,12 +283,16 @@ class LiteSpeed_Cache_Log
280
'HTTP_COOKIE' => '',
281
'X-LSCACHE' => '',
282
'LSCACHE_VARY_COOKIE' => '',
283
- 'LSCACHE_VARY_VALUE' => ''
284
) ;
285
$server = array_merge( $servervars, $_SERVER ) ;
286
$params = array() ;
287
288
- $param = sprintf( '%s %s %s', $server['REQUEST_METHOD'], $server['SERVER_PROTOCOL'], strtok( $server['REQUEST_URI'], '?' ) ) ;
289
290
$qs = ! empty( $server['QUERY_STRING'] ) ? $server['QUERY_STRING'] : '' ;
291
if ( LiteSpeed_Cache::config( LiteSpeed_Cache_Config::OPID_COLLAPS_QS ) ) {
16
private static $log_path ;
17
private static $_prefix ;
18
19
+ private static $_ignore_filters ;
20
+ private static $_ignore_part_filters ;
21
+
22
const TYPE_CLEAR_LOG = 'clear_log' ;
23
24
/**
107
108
// Check if hook filters
109
if ( LiteSpeed_Cache::config( LiteSpeed_Cache_Config::OPID_LOG_FILTERS ) ) {
110
+ self::$_ignore_filters = LiteSpeed_Cache_Config::get_instance()->get_item( LiteSpeed_Cache_Config::ITEM_LOG_IGNORE_FILTERS ) ;
111
+ self::$_ignore_part_filters = LiteSpeed_Cache_Config::get_instance()->get_item( LiteSpeed_Cache_Config::ITEM_LOG_IGNORE_PART_FILTERS ) ;
112
+
113
add_action( 'all', 'LiteSpeed_Cache_Log::log_filters' ) ;
114
}
115
}
123
public static function log_filters()
124
{
125
$action = current_filter() ;
126
+
127
+ if ( self::$_ignore_filters && in_array( $action, self::$_ignore_filters ) ) {
128
+ return ;
129
}
130
131
+ if ( self::$_ignore_part_filters ) {
132
+ foreach ( self::$_ignore_part_filters as $val ) {
133
if ( stripos( $action, $val ) !== false ) {
134
return ;
135
}
283
'HTTP_COOKIE' => '',
284
'X-LSCACHE' => '',
285
'LSCACHE_VARY_COOKIE' => '',
286
+ 'LSCACHE_VARY_VALUE' => '',
287
) ;
288
$server = array_merge( $servervars, $_SERVER ) ;
289
$params = array() ;
290
291
+ if ( isset( $_SERVER[ 'HTTPS' ] ) && $_SERVER[ 'HTTPS' ] == 'on' ) {
292
+ $server['SERVER_PROTOCOL'] .= ' (HTTPS) ' ;
293
+ }
294
+
295
+ $param = sprintf( '------%s %s %s', $server['REQUEST_METHOD'], $server['SERVER_PROTOCOL'], strtok( $server['REQUEST_URI'], '?' ) ) ;
296
297
$qs = ! empty( $server['QUERY_STRING'] ) ? $server['QUERY_STRING'] : '' ;
298
if ( LiteSpeed_Cache::config( LiteSpeed_Cache_Config::OPID_COLLAPS_QS ) ) {
includes/litespeed-cache-purge.class.php CHANGED
@@ -281,7 +281,7 @@ class LiteSpeed_Cache_Purge
281
}
282
283
$this->_pub_purge = array_merge( $this->_pub_purge, $tags ) ;
284
- LiteSpeed_Cache_Log::debug( '[Purge] added ' . implode( ',', $tags ), 3 ) ;
285
286
// Send purge header immediately
287
$curr_built = $this->_build() ;
281
}
282
283
$this->_pub_purge = array_merge( $this->_pub_purge, $tags ) ;
284
+ LiteSpeed_Cache_Log::debug( '[Purge] added ' . implode( ',', $tags ), 8 ) ;
285
286
// Send purge header immediately
287
$curr_built = $this->_build() ;
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.6' ;
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.7' ;
23
24
const PAGE_EDIT_HTACCESS = 'lscache-edit-htaccess' ;
25
includes/litespeed.autoload.php CHANGED
@@ -33,6 +33,7 @@ if ( !function_exists('_litespeed_autoload') ) {
33
'LiteSpeed_Cache_Crawler' => 'inc/crawler.class.php',
34
'LiteSpeed_Cache_Crawler_Sitemap' => 'inc/crawler-sitemap.class.php',
35
'LiteSpeed_Cache_Data' => 'inc/data.class.php',
36
'LiteSpeed_Cache_ESI' => 'inc/esi.class.php',
37
'LiteSpeed_Cache_GUI' => 'inc/gui.class.php',
38
'LiteSpeed_Cache_Import' => 'inc/import.class.php',
33
'LiteSpeed_Cache_Crawler' => 'inc/crawler.class.php',
34
'LiteSpeed_Cache_Crawler_Sitemap' => 'inc/crawler-sitemap.class.php',
35
'LiteSpeed_Cache_Data' => 'inc/data.class.php',
36
+ 'LiteSpeed_Cache_Doc' => 'inc/doc.cls.php',
37
'LiteSpeed_Cache_ESI' => 'inc/esi.class.php',
38
'LiteSpeed_Cache_GUI' => 'inc/gui.class.php',
39
'LiteSpeed_Cache_Import' => 'inc/import.class.php',
languages/litespeed-cache.pot CHANGED
@@ -2,9 +2,9 @@
2
# This file is distributed under the same license as the LiteSpeed Cache package.
3
msgid ""
4
msgstr ""
5
- "Project-Id-Version: LiteSpeed Cache 2.2.6\n"
6
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/litespeed-cache\n"
7
- "POT-Creation-Date: 2018-05-24 18:15:42+00:00\n"
8
"MIME-Version: 1.0\n"
9
"Content-Type: text/plain; charset=UTF-8\n"
10
"Content-Transfer-Encoding: 8bit\n"
@@ -425,7 +425,7 @@ msgid "Site options saved."
425
msgstr ""
426
427
#: admin/litespeed-cache-admin-settings.class.php:342
428
- #: admin/litespeed-cache-admin-settings.class.php:1030
429
msgid "Default Public Cache"
430
msgstr ""
431
@@ -446,25 +446,25 @@ msgstr ""
446
msgid "Log File Size Limit"
447
msgstr ""
448
449
- #: admin/litespeed-cache-admin-settings.class.php:953
450
#: admin/tpl/setting/settings_crawler.php:13
451
msgid "Delay"
452
msgstr ""
453
454
- #: admin/litespeed-cache-admin-settings.class.php:954
455
#: admin/tpl/setting/settings_crawler.php:37
456
msgid "Run Duration"
457
msgstr ""
458
459
- #: admin/litespeed-cache-admin-settings.class.php:955
460
msgid "Cron Interval"
461
msgstr ""
462
463
- #: admin/litespeed-cache-admin-settings.class.php:956
464
msgid "Whole Interval"
465
msgstr ""
466
467
- #: admin/litespeed-cache-admin-settings.class.php:957
468
#: admin/tpl/setting/settings_crawler.php:73
469
msgid "Threads"
470
msgstr ""
@@ -545,6 +545,8 @@ msgstr ""
545
546
#: admin/tpl/crawler.php:92 admin/tpl/image_optimization.php:332
547
#: admin/tpl/inc/check_cache_disabled.php:31 admin/tpl/manage/manage_cdn.php:15
548
#: admin/tpl/setting/settings_optimize.php:13 admin/tpl/settings.php:163
549
msgid "WARNING"
550
msgstr ""
@@ -1031,7 +1033,7 @@ msgid "Total"
1031
msgstr ""
1032
1033
#: admin/tpl/image_optimization.php:326
1034
- msgid "Are you sure to remove all image bakcups?"
1035
msgstr ""
1036
1037
#: admin/tpl/image_optimization.php:327
@@ -1047,7 +1049,7 @@ msgid "This is irreversible."
1047
msgstr ""
1048
1049
#: admin/tpl/image_optimization.php:334
1050
- msgid "You be unable to Revert Optimization once the backups are deleted!"
1051
msgstr ""
1052
1053
#: admin/tpl/image_optimization.php:340
@@ -1101,7 +1103,7 @@ msgstr ""
1101
msgid "Rate %s on %s"
1102
msgstr ""
1103
1104
- #. #-#-#-#-# litespeed-cache.pot (LiteSpeed Cache 2.2.6) #-#-#-#-#
1105
#. Plugin Name of the plugin/theme
1106
#: admin/tpl/inc/admin_footer.php:6 inc/gui.class.php:348
1107
#: includes/litespeed-cache-gui.class.php:348
@@ -2230,91 +2232,69 @@ msgid ""
2230
msgstr ""
2231
2232
#: admin/tpl/setting/settings_crawler.php:139
2233
- msgid "HTTP/2 Crawl"
2234
- msgstr ""
2235
-
2236
- #: admin/tpl/setting/settings_crawler.php:143
2237
- msgid "Crawl using the HTTP/2 protocal."
2238
- msgstr ""
2239
-
2240
- #: admin/tpl/setting/settings_crawler.php:144
2241
- msgid "Current curl HTTP/2 extension status"
2242
- msgstr ""
2243
-
2244
- #: admin/tpl/setting/settings_crawler.php:146
2245
- #: admin/tpl/setting/settings_inc.cache_object.php:4
2246
- msgid "Enabled"
2247
- msgstr ""
2248
-
2249
- #: admin/tpl/setting/settings_crawler.php:148
2250
- #: admin/tpl/setting/settings_inc.cache_object.php:5
2251
- msgid "Disabled"
2252
- msgstr ""
2253
-
2254
- #: admin/tpl/setting/settings_crawler.php:155
2255
- #: admin/tpl/setting/settings_crawler.php:248
2256
msgid "Custom Sitemap"
2257
msgstr ""
2258
2259
- #: admin/tpl/setting/settings_crawler.php:160
2260
msgid ""
2261
"The crawler can use your Google XML Sitemap instead of its own. Enter the "
2262
"full URL to your sitemap here."
2263
msgstr ""
2264
2265
- #: admin/tpl/setting/settings_crawler.php:166
2266
msgid "Sitemap Generation"
2267
msgstr ""
2268
2269
- #: admin/tpl/setting/settings_crawler.php:171
2270
msgid "Include Posts"
2271
msgstr ""
2272
2273
- #: admin/tpl/setting/settings_crawler.php:178
2274
msgid "Include Pages"
2275
msgstr ""
2276
2277
- #: admin/tpl/setting/settings_crawler.php:185
2278
msgid "Include Categories"
2279
msgstr ""
2280
2281
- #: admin/tpl/setting/settings_crawler.php:192
2282
msgid "Include Tags"
2283
msgstr ""
2284
2285
- #: admin/tpl/setting/settings_crawler.php:201
2286
msgid "Exclude Custom Post Types"
2287
msgstr ""
2288
2289
- #: admin/tpl/setting/settings_crawler.php:206
2290
msgid "Exclude certain Custom Post Types in sitemap."
2291
msgstr ""
2292
2293
- #: admin/tpl/setting/settings_crawler.php:212
2294
msgid "Available Custom Post Type"
2295
msgstr ""
2296
2297
- #: admin/tpl/setting/settings_crawler.php:220
2298
msgid "Order links by"
2299
msgstr ""
2300
2301
- #: admin/tpl/setting/settings_crawler.php:226
2302
msgid "Date, descending (Default)"
2303
msgstr ""
2304
2305
- #: admin/tpl/setting/settings_crawler.php:232
2306
msgid "Date, ascending"
2307
msgstr ""
2308
2309
- #: admin/tpl/setting/settings_crawler.php:238
2310
msgid "Alphabetical, descending"
2311
msgstr ""
2312
2313
- #: admin/tpl/setting/settings_crawler.php:244
2314
msgid "Alphabetical, ascending"
2315
msgstr ""
2316
2317
- #: admin/tpl/setting/settings_crawler.php:248
2318
msgid "These options will be invalid when using %s."
2319
msgstr ""
2320
@@ -2398,54 +2378,60 @@ msgstr ""
2398
#: admin/tpl/setting/settings_debug.php:104
2399
msgid ""
2400
"Disable WordPress heartbeat to prevent AJAX calls from breaking debug "
2401
- "logging. WARNING: Disabling this may cause WordPress tasks triggered by AJAX "
2402
- "to stop working."
2403
msgstr ""
2404
2405
- #: admin/tpl/setting/settings_debug.php:110
2406
msgid "Log Cookies"
2407
msgstr ""
2408
2409
- #: admin/tpl/setting/settings_debug.php:114
2410
msgid "Log request cookie values."
2411
msgstr ""
2412
2413
- #: admin/tpl/setting/settings_debug.php:120
2414
msgid "Collapse Query Strings"
2415
msgstr ""
2416
2417
- #: admin/tpl/setting/settings_debug.php:124
2418
msgid "Shorten query strings in the debug log to improve readability."
2419
msgstr ""
2420
2421
- #: admin/tpl/setting/settings_debug.php:130
2422
msgid "Log Filters"
2423
msgstr ""
2424
2425
- #: admin/tpl/setting/settings_debug.php:134
2426
- msgid ""
2427
- "Log all WordPress filter hooks. WARNING: Enabling this option will cause log "
2428
- "file size to grow quickly."
2429
msgstr ""
2430
2431
- #: admin/tpl/setting/settings_debug.php:140
2432
msgid "Exclude Filters"
2433
msgstr ""
2434
2435
- #: admin/tpl/setting/settings_debug.php:144
2436
msgid "Listed filters (one per line) will not be logged."
2437
msgstr ""
2438
2439
- #: admin/tpl/setting/settings_debug.php:145
2440
- #: admin/tpl/setting/settings_debug.php:156
2441
msgid "Recommended default value"
2442
msgstr ""
2443
2444
- #: admin/tpl/setting/settings_debug.php:151
2445
msgid "Exclude Part Filters"
2446
msgstr ""
2447
2448
- #: admin/tpl/setting/settings_debug.php:155
2449
msgid "Filters containing these strings (one per line) will not be logged."
2450
msgstr ""
2451
@@ -2804,6 +2790,14 @@ msgstr ""
2804
msgid "If %1$s is %2$s, then %3$s must be populated!"
2805
msgstr ""
2806
2807
#: admin/tpl/setting/settings_inc.cache_object.php:12
2808
msgid "Not Available"
2809
msgstr ""
@@ -3759,25 +3753,36 @@ msgstr ""
3759
msgid "File created successfully: %s"
3760
msgstr ""
3761
3762
- #: inc/crawler.class.php:310 includes/litespeed-cache-crawler.class.php:310
3763
msgid "Failed to send position reset notification: %s"
3764
msgstr ""
3765
3766
- #: inc/crawler.class.php:314 includes/litespeed-cache-crawler.class.php:314
3767
msgid "Position reset notification sent successfully"
3768
msgstr ""
3769
3770
- #: inc/crawler.class.php:466 includes/litespeed-cache-crawler.class.php:466
3771
#: lib/litespeed/litespeed-crawler.class.php:402
3772
msgid "Crawler %s reached end of sitemap file."
3773
msgstr ""
3774
3775
- #: inc/crawler.class.php:496 inc/crawler.class.php:500
3776
- #: includes/litespeed-cache-crawler.class.php:496
3777
- #: includes/litespeed-cache-crawler.class.php:500
3778
msgid "Guest"
3779
msgstr ""
3780
3781
#: inc/gui.class.php:277 includes/litespeed-cache-gui.class.php:277
3782
msgid "Purge this page"
3783
msgstr ""
2
# This file is distributed under the same license as the LiteSpeed Cache package.
3
msgid ""
4
msgstr ""
5
+ "Project-Id-Version: LiteSpeed Cache 2.2.7\n"
6
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/litespeed-cache\n"
7
+ "POT-Creation-Date: 2018-06-04 14:18:31+00:00\n"
8
"MIME-Version: 1.0\n"
9
"Content-Type: text/plain; charset=UTF-8\n"
10
"Content-Transfer-Encoding: 8bit\n"
425
msgstr ""
426
427
#: admin/litespeed-cache-admin-settings.class.php:342
428
+ #: admin/litespeed-cache-admin-settings.class.php:1029
429
msgid "Default Public Cache"
430
msgstr ""
431
446
msgid "Log File Size Limit"
447
msgstr ""
448
449
+ #: admin/litespeed-cache-admin-settings.class.php:952
450
#: admin/tpl/setting/settings_crawler.php:13
451
msgid "Delay"
452
msgstr ""
453
454
+ #: admin/litespeed-cache-admin-settings.class.php:953
455
#: admin/tpl/setting/settings_crawler.php:37
456
msgid "Run Duration"
457
msgstr ""
458
459
+ #: admin/litespeed-cache-admin-settings.class.php:954
460
msgid "Cron Interval"
461
msgstr ""
462
463
+ #: admin/litespeed-cache-admin-settings.class.php:955
464
msgid "Whole Interval"
465
msgstr ""
466
467
+ #: admin/litespeed-cache-admin-settings.class.php:956
468
#: admin/tpl/setting/settings_crawler.php:73
469
msgid "Threads"
470
msgstr ""
545
546
#: admin/tpl/crawler.php:92 admin/tpl/image_optimization.php:332
547
#: admin/tpl/inc/check_cache_disabled.php:31 admin/tpl/manage/manage_cdn.php:15
548
+ #: admin/tpl/setting/settings_debug.php:105
549
+ #: admin/tpl/setting/settings_debug.php:138
550
#: admin/tpl/setting/settings_optimize.php:13 admin/tpl/settings.php:163
551
msgid "WARNING"
552
msgstr ""
1033
msgstr ""
1034
1035
#: admin/tpl/image_optimization.php:326
1036
+ msgid "Are you sure to remove all image backups?"
1037
msgstr ""
1038
1039
#: admin/tpl/image_optimization.php:327
1049
msgstr ""
1050
1051
#: admin/tpl/image_optimization.php:334
1052
+ msgid "You will be unable to Revert Optimization once the backups are deleted!"
1053
msgstr ""
1054
1055
#: admin/tpl/image_optimization.php:340
1103
msgid "Rate %s on %s"
1104
msgstr ""
1105
1106
+ #. #-#-#-#-# litespeed-cache.pot (LiteSpeed Cache 2.2.7) #-#-#-#-#
1107
#. Plugin Name of the plugin/theme
1108
#: admin/tpl/inc/admin_footer.php:6 inc/gui.class.php:348
1109
#: includes/litespeed-cache-gui.class.php:348
2232
msgstr ""
2233
2234
#: admin/tpl/setting/settings_crawler.php:139
2235
+ #: admin/tpl/setting/settings_crawler.php:232
2236
msgid "Custom Sitemap"
2237
msgstr ""
2238
2239
+ #: admin/tpl/setting/settings_crawler.php:144
2240
msgid ""
2241
"The crawler can use your Google XML Sitemap instead of its own. Enter the "
2242
"full URL to your sitemap here."
2243
msgstr ""
2244
2245
+ #: admin/tpl/setting/settings_crawler.php:150
2246
msgid "Sitemap Generation"
2247
msgstr ""
2248
2249
+ #: admin/tpl/setting/settings_crawler.php:155
2250
msgid "Include Posts"
2251
msgstr ""
2252
2253
+ #: admin/tpl/setting/settings_crawler.php:162
2254
msgid "Include Pages"
2255
msgstr ""
2256
2257
+ #: admin/tpl/setting/settings_crawler.php:169
2258
msgid "Include Categories"
2259
msgstr ""
2260
2261
+ #: admin/tpl/setting/settings_crawler.php:176
2262
msgid "Include Tags"
2263
msgstr ""
2264
2265
+ #: admin/tpl/setting/settings_crawler.php:185
2266
msgid "Exclude Custom Post Types"
2267
msgstr ""
2268
2269
+ #: admin/tpl/setting/settings_crawler.php:190
2270
msgid "Exclude certain Custom Post Types in sitemap."
2271
msgstr ""
2272
2273
+ #: admin/tpl/setting/settings_crawler.php:196
2274
msgid "Available Custom Post Type"
2275
msgstr ""
2276
2277
+ #: admin/tpl/setting/settings_crawler.php:204
2278
msgid "Order links by"
2279
msgstr ""
2280
2281
+ #: admin/tpl/setting/settings_crawler.php:210
2282
msgid "Date, descending (Default)"
2283
msgstr ""
2284
2285
+ #: admin/tpl/setting/settings_crawler.php:216
2286
msgid "Date, ascending"
2287
msgstr ""
2288
2289
+ #: admin/tpl/setting/settings_crawler.php:222
2290
msgid "Alphabetical, descending"
2291
msgstr ""
2292
2293
+ #: admin/tpl/setting/settings_crawler.php:228
2294
msgid "Alphabetical, ascending"
2295
msgstr ""
2296
2297
+ #: admin/tpl/setting/settings_crawler.php:232
2298
msgid "These options will be invalid when using %s."
2299
msgstr ""
2300
2378
#: admin/tpl/setting/settings_debug.php:104
2379
msgid ""
2380
"Disable WordPress heartbeat to prevent AJAX calls from breaking debug "
2381
+ "logging."
2382
msgstr ""
2383
2384
+ #: admin/tpl/setting/settings_debug.php:106
2385
+ msgid ""
2386
+ "Disabling this may cause WordPress tasks triggered by AJAX to stop working."
2387
+ msgstr ""
2388
+
2389
+ #: admin/tpl/setting/settings_debug.php:113
2390
msgid "Log Cookies"
2391
msgstr ""
2392
2393
+ #: admin/tpl/setting/settings_debug.php:117
2394
msgid "Log request cookie values."
2395
msgstr ""
2396
2397
+ #: admin/tpl/setting/settings_debug.php:123
2398
msgid "Collapse Query Strings"
2399
msgstr ""
2400
2401
+ #: admin/tpl/setting/settings_debug.php:127
2402
msgid "Shorten query strings in the debug log to improve readability."
2403
msgstr ""
2404
2405
+ #: admin/tpl/setting/settings_debug.php:133
2406
msgid "Log Filters"
2407
msgstr ""
2408
2409
+ #: admin/tpl/setting/settings_debug.php:137
2410
+ msgid "Log all WordPress filter hooks."
2411
msgstr ""
2412
2413
+ #: admin/tpl/setting/settings_debug.php:139
2414
+ msgid "Enabling this option will cause log file size to grow quickly."
2415
+ msgstr ""
2416
+
2417
+ #: admin/tpl/setting/settings_debug.php:146
2418
msgid "Exclude Filters"
2419
msgstr ""
2420
2421
+ #: admin/tpl/setting/settings_debug.php:150
2422
msgid "Listed filters (one per line) will not be logged."
2423
msgstr ""
2424
2425
+ #: admin/tpl/setting/settings_debug.php:151
2426
+ #: admin/tpl/setting/settings_debug.php:162
2427
msgid "Recommended default value"
2428
msgstr ""
2429
2430
+ #: admin/tpl/setting/settings_debug.php:157
2431
msgid "Exclude Part Filters"
2432
msgstr ""
2433
2434
+ #: admin/tpl/setting/settings_debug.php:161
2435
msgid "Filters containing these strings (one per line) will not be logged."
2436
msgstr ""
2437
2790
msgid "If %1$s is %2$s, then %3$s must be populated!"
2791
msgstr ""
2792
2793
+ #: admin/tpl/setting/settings_inc.cache_object.php:4
2794
+ msgid "Enabled"
2795
+ msgstr ""
2796
+
2797
+ #: admin/tpl/setting/settings_inc.cache_object.php:5
2798
+ msgid "Disabled"
2799
+ msgstr ""
2800
+
2801
#: admin/tpl/setting/settings_inc.cache_object.php:12
2802
msgid "Not Available"
2803
msgstr ""
3753
msgid "File created successfully: %s"
3754
msgstr ""
3755
3756
+ #: inc/crawler.class.php:318 includes/litespeed-cache-crawler.class.php:318
3757
msgid "Failed to send position reset notification: %s"
3758
msgstr ""
3759
3760
+ #: inc/crawler.class.php:322 includes/litespeed-cache-crawler.class.php:322
3761
msgid "Position reset notification sent successfully"
3762
msgstr ""
3763
3764
+ #: inc/crawler.class.php:472 includes/litespeed-cache-crawler.class.php:472
3765
#: lib/litespeed/litespeed-crawler.class.php:402
3766
msgid "Crawler %s reached end of sitemap file."
3767
msgstr ""
3768
3769
+ #: inc/crawler.class.php:502 inc/crawler.class.php:506
3770
+ #: includes/litespeed-cache-crawler.class.php:502
3771
+ #: includes/litespeed-cache-crawler.class.php:506
3772
msgid "Guest"
3773
msgstr ""
3774
3775
+ #: inc/doc.cls.php:24
3776
+ msgid ""
3777
+ "This site utilizes caching in order to facilitate a faster response time and "
3778
+ "better user experience. Caching potentially stores a duplicate copy of every "
3779
+ "web page that is on display on this site. All cache files are temporary, and "
3780
+ "are never accessed by any third party, except as necessary to obtain "
3781
+ "technical support from the cache plugin vendor. Cache files expire on a "
3782
+ "schedule set by the site administrator, but may easily be purged by the "
3783
+ "admin before their natural expiration, if necessary."
3784
+ msgstr ""
3785
+
3786
#: inc/gui.class.php:277 includes/litespeed-cache-gui.class.php:277
3787
msgid "Purge this page"
3788
msgstr ""
lib/litespeed/litespeed-crawler.class.php CHANGED
@@ -565,14 +565,15 @@ class Litespeed_Crawler
565
/**
566
* Try to enable http2 connection (only available since PHP7+)
567
* @since 1.9.1
568
*/
569
- if ( defined( 'CURL_HTTP_VERSION_2' ) && $this->_http2 ) {
570
- defined( 'LSCWP_LOG' ) && LiteSpeed_Cache_Log::debug( 'Crawler Lib: Enabled HTTP2' ) ;
571
- $options[ CURL_HTTP_VERSION_2 ] = 1 ;
572
- }
573
- else {
574
- $options[ CURL_HTTP_VERSION_1_1 ] = 1 ;
575
- }
576
577
if ( ! $ua ) {
578
$ua = self::FAST_USER_AGENT ;
565
/**
566
* Try to enable http2 connection (only available since PHP7+)
567
* @since 1.9.1
568
+ * @since 2.2.7 Commented due to cause no-cache issue
569
*/
570
+ $options[ CURL_HTTP_VERSION_1_1 ] = 1 ;
571
+ // if ( defined( 'CURL_HTTP_VERSION_2' ) && $this->_http2 ) {
572
+ // defined( 'LSCWP_LOG' ) && LiteSpeed_Cache_Log::debug( 'Crawler Lib: Enabled HTTP2' ) ;
573
+ // $options[ CURL_HTTP_VERSION_2 ] = 1 ;
574
+ // }
575
+ // else {
576
+ // }
577
578
if ( ! $ua ) {
579
$ua = self::FAST_USER_AGENT ;
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.6
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.7
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.5
6
- Stable tag: 2.2.6
7
License: GPLv3
8
License URI: http://www.gnu.org/licenses/gpl.html
9
@@ -266,6 +266,15 @@ Click on the `Advanced View` link at the top of the page, and several more tabs
266
267
== Changelog ==
268
269
= 2.2.6 - May 24 2018 =
270
* [NEW FEATURE] Original image backups can be removed now. (@borisov87 @JMCA2)
271
* [BUGFIX] Role Excludes in Tuning tab can save now. (@pako69)
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.5
6
+ Stable tag: 2.2.7
7
License: GPLv3
8
License URI: http://www.gnu.org/licenses/gpl.html
9
266
267
== Changelog ==
268
269
+ = 2.2.7 - Jun 4 2018 =
270
+ * [IMPROVEMENT] Improved redirection for manual image pull to avoid too many redirections warning.
271
+ * [IAPI] Increased credit limit.
272
+ * [BUGFIX] Fixed 503 error when enabling log filters in Debug tab. (#525206)
273
+ * [UPDATE] Improve compatibility when using sitemap url on servers with allow_url_open off.
274
+ * [UPDATE] Removed Crawler HTTP2 option due to causing no-cache blacklist issue for certain environments.
275
+ * [UPDATE] Privacy policy can be now translated. (@Josemi)
276
+ * [UPDATE] IAPI Increased default img request max to 3000.
277
+
278
= 2.2.6 - May 24 2018 =
279
* [NEW FEATURE] Original image backups can be removed now. (@borisov87 @JMCA2)
280
* [BUGFIX] Role Excludes in Tuning tab can save now. (@pako69)