Skip to content

Commit

Permalink
v7.0-b11: * **Purge** Allowed LSWCP_EMPTYCACHE defined to false to …
Browse files Browse the repository at this point in the history
…disable Purge all sites.
  • Loading branch information
Hai Zheng committed Nov 11, 2024
1 parent 3d9cbcf commit 5c23ee7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions litespeed-cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Plugin Name: LiteSpeed Cache
* Plugin URI: https://www.litespeedtech.com/products/cache-plugins/wordpress-acceleration
* Description: High-performance page caching and site optimization from LiteSpeed
* Version: 7.0-b10
* Version: 7.0-b11
* Author: LiteSpeed Technologies
* Author URI: https://www.litespeedtech.com
* License: GPLv3
Expand Down Expand Up @@ -34,7 +34,7 @@
return;
}

!defined('LSCWP_V') && define('LSCWP_V', '7.0-b10');
!defined('LSCWP_V') && define('LSCWP_V', '7.0-b11');

!defined('LSCWP_CONTENT_DIR') && define('LSCWP_CONTENT_DIR', WP_CONTENT_DIR);
!defined('LSCWP_DIR') && define('LSCWP_DIR', __DIR__ . '/'); // Full absolute path '/var/www/html/***/wp-content/plugins/litespeed-cache/' or MU
Expand Down
1 change: 1 addition & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ You can report security bugs through the Patchstack Vulnerability Disclosure Pro
* **CLI** New QUIC.cloud CDN CLI `wp litespeed-online cdn_status`.
* **CLI** QUIC.cloud CLI `wp litespeed-online ping` supports `--force` args now.
* **Image Optimization** Dropped `Auto Pull Cron` setting. Added PHP const `LITESPEED_IMG_OPTM_ORI` support.
* **Purge** Allowed `LSWCP_EMPTYCACHE` defined to false to disable Purge all sites.
* **Crawler** Enhanced hash generation function for cryptographic security.
* **Crawler** Added back `Role Simulator` w/ IP limited to `127.0.0.1` only.
* **Crawler** Default crawler `Run Duration` to 900 seconds and dropped the setting.
Expand Down
4 changes: 2 additions & 2 deletions src/purge.cls.php
Original file line number Diff line number Diff line change
Expand Up @@ -1097,7 +1097,7 @@ private function _append_prefix($purge_tags, $is_private = false)
Crawler::cls()->reset_pos();
}

if (defined('LSWCP_EMPTYCACHE') || $is_private) {
if ((defined('LSWCP_EMPTYCACHE') && LSWCP_EMPTYCACHE) || $is_private) {
return array('*');
}

Expand Down Expand Up @@ -1132,7 +1132,7 @@ private function _is_subsite_purge()
return false;
}

if (defined('LSWCP_EMPTYCACHE')) {
if (defined('LSWCP_EMPTYCACHE') && LSWCP_EMPTYCACHE) {
return false;
}

Expand Down

0 comments on commit 5c23ee7

Please sign in to comment.