Version Description
- Feb 5 2019 =
-
API: Add a hook
litespeed_esi_shortcode-*
for ESI shortcodes. - 3rd: WooCommerce can purge products now when variation stock is changed.
- : Forced HTTP1.1 for crawler due to a CURL HTTP2 bug.
Download this release
Release Info
Developer | LiteSpeedTech |
Plugin | LiteSpeed Cache |
Version | 2.9.2 |
Comparing to | |
See all releases |
Code changes from version 2.9.1 to 2.9.2
- inc/esi.class.php +2 -0
- inc/litespeed-cache.class.php +1 -1
- includes/litespeed-cache-esi.class.php +2 -0
- includes/litespeed-cache.class.php +1 -1
- languages/litespeed-cache.pot +20 -20
- lib/litespeed/litespeed-crawler.class.php +2 -1
- litespeed-cache.php +1 -1
- readme.txt +6 -1
- thirdparty/lscwp-3rd-woocommerce.cls.php +7 -1
inc/esi.class.php
CHANGED
@@ -100,6 +100,8 @@ class LiteSpeed_Cache_ESI
|
|
100 |
unset( $atts[ 'cache' ] ) ;
|
101 |
}
|
102 |
|
|
|
|
|
103 |
// Show ESI link
|
104 |
return self::sub_esi_block( 'esi', 'esi-shortcode', $atts, $cache ) ;
|
105 |
}
|
100 |
unset( $atts[ 'cache' ] ) ;
|
101 |
}
|
102 |
|
103 |
+
do_action( 'litespeed_esi_shortcode-' . $atts[ 0 ] ) ;
|
104 |
+
|
105 |
// Show ESI link
|
106 |
return self::sub_esi_block( 'esi', 'esi-shortcode', $atts, $cache ) ;
|
107 |
}
|
inc/litespeed-cache.class.php
CHANGED
@@ -26,7 +26,7 @@ class LiteSpeed_Cache
|
|
26 |
const NAME = 'LiteSpeed Cache' ;
|
27 |
const PLUGIN_NAME = 'litespeed-cache' ;
|
28 |
const PLUGIN_FILE = 'litespeed-cache/litespeed-cache.php' ;
|
29 |
-
const PLUGIN_VERSION = '2.9.
|
30 |
|
31 |
const PAGE_EDIT_HTACCESS = 'lscache-edit-htaccess' ;
|
32 |
|
26 |
const NAME = 'LiteSpeed Cache' ;
|
27 |
const PLUGIN_NAME = 'litespeed-cache' ;
|
28 |
const PLUGIN_FILE = 'litespeed-cache/litespeed-cache.php' ;
|
29 |
+
const PLUGIN_VERSION = '2.9.2' ;
|
30 |
|
31 |
const PAGE_EDIT_HTACCESS = 'lscache-edit-htaccess' ;
|
32 |
|
includes/litespeed-cache-esi.class.php
CHANGED
@@ -100,6 +100,8 @@ class LiteSpeed_Cache_ESI
|
|
100 |
unset( $atts[ 'cache' ] ) ;
|
101 |
}
|
102 |
|
|
|
|
|
103 |
// Show ESI link
|
104 |
return self::sub_esi_block( 'esi', 'esi-shortcode', $atts, $cache ) ;
|
105 |
}
|
100 |
unset( $atts[ 'cache' ] ) ;
|
101 |
}
|
102 |
|
103 |
+
do_action( 'litespeed_esi_shortcode-' . $atts[ 0 ] ) ;
|
104 |
+
|
105 |
// Show ESI link
|
106 |
return self::sub_esi_block( 'esi', 'esi-shortcode', $atts, $cache ) ;
|
107 |
}
|
includes/litespeed-cache.class.php
CHANGED
@@ -26,7 +26,7 @@ class LiteSpeed_Cache
|
|
26 |
const NAME = 'LiteSpeed Cache' ;
|
27 |
const PLUGIN_NAME = 'litespeed-cache' ;
|
28 |
const PLUGIN_FILE = 'litespeed-cache/litespeed-cache.php' ;
|
29 |
-
const PLUGIN_VERSION = '2.9.
|
30 |
|
31 |
const PAGE_EDIT_HTACCESS = 'lscache-edit-htaccess' ;
|
32 |
|
26 |
const NAME = 'LiteSpeed Cache' ;
|
27 |
const PLUGIN_NAME = 'litespeed-cache' ;
|
28 |
const PLUGIN_FILE = 'litespeed-cache/litespeed-cache.php' ;
|
29 |
+
const PLUGIN_VERSION = '2.9.2' ;
|
30 |
|
31 |
const PAGE_EDIT_HTACCESS = 'lscache-edit-htaccess' ;
|
32 |
|
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.9.
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/litespeed-cache\n"
|
7 |
-
"POT-Creation-Date: 2019-
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
@@ -852,7 +852,7 @@ msgstr ""
|
|
852 |
msgid "Rate %s on %s"
|
853 |
msgstr ""
|
854 |
|
855 |
-
#. #-#-#-#-# litespeed-cache.pot (LiteSpeed Cache 2.9.
|
856 |
#. Plugin Name of the plugin/theme
|
857 |
#: admin/tpl/inc/admin_footer.php:6 inc/gui.class.php:472
|
858 |
#: includes/litespeed-cache-gui.class.php:472
|
@@ -3719,7 +3719,7 @@ msgid "Auto Purge Rules For Publish/Update"
|
|
3719 |
msgstr ""
|
3720 |
|
3721 |
#: admin/tpl/setting/settings_purge.php:53
|
3722 |
-
#: thirdparty/lscwp-3rd-woocommerce.cls.php:
|
3723 |
msgid "Note"
|
3724 |
msgstr ""
|
3725 |
|
@@ -4405,75 +4405,75 @@ msgstr ""
|
|
4405 |
msgid "Failed to write to %s."
|
4406 |
msgstr ""
|
4407 |
|
4408 |
-
#: thirdparty/lscwp-3rd-woocommerce.cls.php:
|
4409 |
msgid "WooCommerce"
|
4410 |
msgstr ""
|
4411 |
|
4412 |
-
#: thirdparty/lscwp-3rd-woocommerce.cls.php:
|
4413 |
msgid "Purge product on changes to the quantity or stock status."
|
4414 |
msgstr ""
|
4415 |
|
4416 |
-
#: thirdparty/lscwp-3rd-woocommerce.cls.php:
|
4417 |
msgid "Purge categories only when stock status changes."
|
4418 |
msgstr ""
|
4419 |
|
4420 |
-
#: thirdparty/lscwp-3rd-woocommerce.cls.php:
|
4421 |
msgid "Purge product and categories only when the stock status changes."
|
4422 |
msgstr ""
|
4423 |
|
4424 |
-
#: thirdparty/lscwp-3rd-woocommerce.cls.php:
|
4425 |
msgid "Purge product only when the stock status changes."
|
4426 |
msgstr ""
|
4427 |
|
4428 |
-
#: thirdparty/lscwp-3rd-woocommerce.cls.php:
|
4429 |
msgid "Do not purge categories on changes to the quantity or stock status."
|
4430 |
msgstr ""
|
4431 |
|
4432 |
-
#: thirdparty/lscwp-3rd-woocommerce.cls.php:
|
4433 |
msgid ""
|
4434 |
"Always purge both product and categories on changes to the quantity or stock "
|
4435 |
"status."
|
4436 |
msgstr ""
|
4437 |
|
4438 |
-
#: thirdparty/lscwp-3rd-woocommerce.cls.php:
|
4439 |
msgid ""
|
4440 |
"Determines how changes in product quantity and product stock status affect "
|
4441 |
"product pages and their associated category pages."
|
4442 |
msgstr ""
|
4443 |
|
4444 |
-
#: thirdparty/lscwp-3rd-woocommerce.cls.php:
|
4445 |
msgid ""
|
4446 |
"Checking this option will force the shop page to use the front page TTL "
|
4447 |
"setting."
|
4448 |
msgstr ""
|
4449 |
|
4450 |
-
#: thirdparty/lscwp-3rd-woocommerce.cls.php:
|
4451 |
msgid ""
|
4452 |
"For example, if the homepage for the site is located at %1$s, the shop page "
|
4453 |
"may be located at %2$s."
|
4454 |
msgstr ""
|
4455 |
|
4456 |
-
#: thirdparty/lscwp-3rd-woocommerce.cls.php:
|
4457 |
msgid "Product Update Interval"
|
4458 |
msgstr ""
|
4459 |
|
4460 |
-
#: thirdparty/lscwp-3rd-woocommerce.cls.php:
|
4461 |
msgid "Use Front Page TTL for the Shop Page"
|
4462 |
msgstr ""
|
4463 |
|
4464 |
-
#: thirdparty/lscwp-3rd-woocommerce.cls.php:
|
4465 |
msgid "Privately Cache Cart"
|
4466 |
msgstr ""
|
4467 |
|
4468 |
-
#: thirdparty/lscwp-3rd-woocommerce.cls.php:
|
4469 |
msgid "Privately cache cart when not empty."
|
4470 |
msgstr ""
|
4471 |
|
4472 |
-
#: thirdparty/lscwp-3rd-woocommerce.cls.php:
|
4473 |
msgid "After verifying that the cache works in general, please test the cart."
|
4474 |
msgstr ""
|
4475 |
|
4476 |
-
#: thirdparty/lscwp-3rd-woocommerce.cls.php:
|
4477 |
msgid "To test the cart, visit the <a %s>FAQ</a>."
|
4478 |
msgstr ""
|
4479 |
|
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.9.2\n"
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/litespeed-cache\n"
|
7 |
+
"POT-Creation-Date: 2019-02-05 15:17:30+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
852 |
msgid "Rate %s on %s"
|
853 |
msgstr ""
|
854 |
|
855 |
+
#. #-#-#-#-# litespeed-cache.pot (LiteSpeed Cache 2.9.2) #-#-#-#-#
|
856 |
#. Plugin Name of the plugin/theme
|
857 |
#: admin/tpl/inc/admin_footer.php:6 inc/gui.class.php:472
|
858 |
#: includes/litespeed-cache-gui.class.php:472
|
3719 |
msgstr ""
|
3720 |
|
3721 |
#: admin/tpl/setting/settings_purge.php:53
|
3722 |
+
#: thirdparty/lscwp-3rd-woocommerce.cls.php:864
|
3723 |
msgid "Note"
|
3724 |
msgstr ""
|
3725 |
|
4405 |
msgid "Failed to write to %s."
|
4406 |
msgstr ""
|
4407 |
|
4408 |
+
#: thirdparty/lscwp-3rd-woocommerce.cls.php:799
|
4409 |
msgid "WooCommerce"
|
4410 |
msgstr ""
|
4411 |
|
4412 |
+
#: thirdparty/lscwp-3rd-woocommerce.cls.php:802
|
4413 |
msgid "Purge product on changes to the quantity or stock status."
|
4414 |
msgstr ""
|
4415 |
|
4416 |
+
#: thirdparty/lscwp-3rd-woocommerce.cls.php:803
|
4417 |
msgid "Purge categories only when stock status changes."
|
4418 |
msgstr ""
|
4419 |
|
4420 |
+
#: thirdparty/lscwp-3rd-woocommerce.cls.php:804
|
4421 |
msgid "Purge product and categories only when the stock status changes."
|
4422 |
msgstr ""
|
4423 |
|
4424 |
+
#: thirdparty/lscwp-3rd-woocommerce.cls.php:805
|
4425 |
msgid "Purge product only when the stock status changes."
|
4426 |
msgstr ""
|
4427 |
|
4428 |
+
#: thirdparty/lscwp-3rd-woocommerce.cls.php:806
|
4429 |
msgid "Do not purge categories on changes to the quantity or stock status."
|
4430 |
msgstr ""
|
4431 |
|
4432 |
+
#: thirdparty/lscwp-3rd-woocommerce.cls.php:807
|
4433 |
msgid ""
|
4434 |
"Always purge both product and categories on changes to the quantity or stock "
|
4435 |
"status."
|
4436 |
msgstr ""
|
4437 |
|
4438 |
+
#: thirdparty/lscwp-3rd-woocommerce.cls.php:810
|
4439 |
msgid ""
|
4440 |
"Determines how changes in product quantity and product stock status affect "
|
4441 |
"product pages and their associated category pages."
|
4442 |
msgstr ""
|
4443 |
|
4444 |
+
#: thirdparty/lscwp-3rd-woocommerce.cls.php:811
|
4445 |
msgid ""
|
4446 |
"Checking this option will force the shop page to use the front page TTL "
|
4447 |
"setting."
|
4448 |
msgstr ""
|
4449 |
|
4450 |
+
#: thirdparty/lscwp-3rd-woocommerce.cls.php:812
|
4451 |
msgid ""
|
4452 |
"For example, if the homepage for the site is located at %1$s, the shop page "
|
4453 |
"may be located at %2$s."
|
4454 |
msgstr ""
|
4455 |
|
4456 |
+
#: thirdparty/lscwp-3rd-woocommerce.cls.php:840
|
4457 |
msgid "Product Update Interval"
|
4458 |
msgstr ""
|
4459 |
|
4460 |
+
#: thirdparty/lscwp-3rd-woocommerce.cls.php:847
|
4461 |
msgid "Use Front Page TTL for the Shop Page"
|
4462 |
msgstr ""
|
4463 |
|
4464 |
+
#: thirdparty/lscwp-3rd-woocommerce.cls.php:854
|
4465 |
msgid "Privately Cache Cart"
|
4466 |
msgstr ""
|
4467 |
|
4468 |
+
#: thirdparty/lscwp-3rd-woocommerce.cls.php:858
|
4469 |
msgid "Privately cache cart when not empty."
|
4470 |
msgstr ""
|
4471 |
|
4472 |
+
#: thirdparty/lscwp-3rd-woocommerce.cls.php:866
|
4473 |
msgid "After verifying that the cache works in general, please test the cart."
|
4474 |
msgstr ""
|
4475 |
|
4476 |
+
#: thirdparty/lscwp-3rd-woocommerce.cls.php:867
|
4477 |
msgid "To test the cart, visit the <a %s>FAQ</a>."
|
4478 |
msgstr ""
|
4479 |
|
lib/litespeed/litespeed-crawler.class.php
CHANGED
@@ -577,8 +577,9 @@ class Litespeed_Crawler
|
|
577 |
* Try to enable http2 connection (only available since PHP7+)
|
578 |
* @since 1.9.1
|
579 |
* @since 2.2.7 Commented due to cause no-cache issue
|
|
|
580 |
*/
|
581 |
-
$options[
|
582 |
// if ( defined( 'CURL_HTTP_VERSION_2' ) && $this->_http2 ) {
|
583 |
// defined( 'LSCWP_LOG' ) && LiteSpeed_Cache_Log::debug( 'Crawler Lib: Enabled HTTP2' ) ;
|
584 |
// $options[ CURL_HTTP_VERSION_2 ] = 1 ;
|
577 |
* Try to enable http2 connection (only available since PHP7+)
|
578 |
* @since 1.9.1
|
579 |
* @since 2.2.7 Commented due to cause no-cache issue
|
580 |
+
* @since 2.9.1+ Fixed wrongly usage of CURL_HTTP_VERSION_1_1 const
|
581 |
*/
|
582 |
+
$options[ CURLOPT_HTTP_VERSION ] = CURL_HTTP_VERSION_1_1 ;
|
583 |
// if ( defined( 'CURL_HTTP_VERSION_2' ) && $this->_http2 ) {
|
584 |
// defined( 'LSCWP_LOG' ) && LiteSpeed_Cache_Log::debug( 'Crawler Lib: Enabled HTTP2' ) ;
|
585 |
// $options[ CURL_HTTP_VERSION_2 ] = 1 ;
|
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: High-performance page caching and site optimization from LiteSpeed
|
18 |
-
* Version: 2.9.
|
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: High-performance page caching and site optimization from LiteSpeed
|
18 |
+
* Version: 2.9.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: caching, optimize, performance, pagespeed, seo, speed, image optimize, compress, object cache, redis, memcached, database cleaner
|
4 |
Requires at least: 4.0
|
5 |
Tested up to: 5.0.3
|
6 |
-
Stable tag: 2.9.
|
7 |
License: GPLv3
|
8 |
License URI: http://www.gnu.org/licenses/gpl.html
|
9 |
|
@@ -281,6 +281,11 @@ Click on the `Advanced View` link at the top of the page, and several more tabs
|
|
281 |
|
282 |
== Changelog ==
|
283 |
|
|
|
|
|
|
|
|
|
|
|
284 |
= 2.9.1 - Jan 25 2019 =
|
285 |
* <strong>Compatibility</strong>: Fixed fatal error for PHP 5.3.
|
286 |
* <strong>Compatibility</strong>: Fixed PHP warning in htmlspecialchars when building URLs. (@souljahn2)
|
3 |
Tags: caching, optimize, performance, pagespeed, seo, speed, image optimize, compress, object cache, redis, memcached, database cleaner
|
4 |
Requires at least: 4.0
|
5 |
Tested up to: 5.0.3
|
6 |
+
Stable tag: 2.9.2
|
7 |
License: GPLv3
|
8 |
License URI: http://www.gnu.org/licenses/gpl.html
|
9 |
|
281 |
|
282 |
== Changelog ==
|
283 |
|
284 |
+
= 2.9.2 - Feb 5 2019 =
|
285 |
+
* <strong>API</strong>: Add a hook `litespeed_esi_shortcode-*` for ESI shortcodes.
|
286 |
+
* <strong>3rd</strong>: WooCommerce can purge products now when variation stock is changed.
|
287 |
+
* 🐞🕷️: Forced HTTP1.1 for crawler due to a CURL HTTP2 bug.
|
288 |
+
|
289 |
= 2.9.1 - Jan 25 2019 =
|
290 |
* <strong>Compatibility</strong>: Fixed fatal error for PHP 5.3.
|
291 |
* <strong>Compatibility</strong>: Fixed PHP warning in htmlspecialchars when building URLs. (@souljahn2)
|
thirdparty/lscwp-3rd-woocommerce.cls.php
CHANGED
@@ -68,6 +68,7 @@ class LiteSpeed_Cache_ThirdParty_WooCommerce
|
|
68 |
|
69 |
// Purging a product on stock change should only occur during product purchase. This function will add the purging callback when an order is complete.
|
70 |
add_action( 'woocommerce_product_set_stock', array( $this, 'purge_product' ) ) ;
|
|
|
71 |
|
72 |
LiteSpeed_Cache_API::hook_get_options( array( $this, 'get_config' ) ) ;
|
73 |
add_action( 'comment_post', array( $this, 'add_review' ), 10, 3 ) ;
|
@@ -665,7 +666,12 @@ class LiteSpeed_Cache_ThirdParty_WooCommerce
|
|
665 |
$this->backend_purge($product->get_id()) ;
|
666 |
}
|
667 |
|
668 |
-
LiteSpeed_Cache_API::purge(LiteSpeed_Cache_API::TYPE_POST . $product->get_id()) ;
|
|
|
|
|
|
|
|
|
|
|
669 |
}
|
670 |
|
671 |
/**
|
68 |
|
69 |
// Purging a product on stock change should only occur during product purchase. This function will add the purging callback when an order is complete.
|
70 |
add_action( 'woocommerce_product_set_stock', array( $this, 'purge_product' ) ) ;
|
71 |
+
add_action( 'woocommerce_variation_set_stock', array( $this, 'purge_product' ) ) ; // #984479 Update variations stock
|
72 |
|
73 |
LiteSpeed_Cache_API::hook_get_options( array( $this, 'get_config' ) ) ;
|
74 |
add_action( 'comment_post', array( $this, 'add_review' ), 10, 3 ) ;
|
666 |
$this->backend_purge($product->get_id()) ;
|
667 |
}
|
668 |
|
669 |
+
LiteSpeed_Cache_API::purge( LiteSpeed_Cache_API::TYPE_POST . $product->get_id() ) ;
|
670 |
+
|
671 |
+
// Check if is variation, purge stock too #984479
|
672 |
+
if ( $product->is_type( 'variation' ) ) {
|
673 |
+
LiteSpeed_Cache_API::purge( LiteSpeed_Cache_API::TYPE_POST . $product->get_parent_id() ) ;
|
674 |
+
}
|
675 |
}
|
676 |
|
677 |
/**
|