From 5c23ee7680f1b69ef563edf507716b284f69cf97 Mon Sep 17 00:00:00 2001 From: Hai Zheng Date: Mon, 11 Nov 2024 16:20:47 -0500 Subject: [PATCH] v7.0-b11: * **Purge** Allowed `LSWCP_EMPTYCACHE` defined to false to disable Purge all sites. --- litespeed-cache.php | 4 ++-- readme.txt | 1 + src/purge.cls.php | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/litespeed-cache.php b/litespeed-cache.php index d1efb5708..be2b6a5ae 100644 --- a/litespeed-cache.php +++ b/litespeed-cache.php @@ -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 @@ -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 diff --git a/readme.txt b/readme.txt index 548092f13..64730af0e 100644 --- a/readme.txt +++ b/readme.txt @@ -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. diff --git a/src/purge.cls.php b/src/purge.cls.php index 59ab9983d..037505d00 100644 --- a/src/purge.cls.php +++ b/src/purge.cls.php @@ -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('*'); } @@ -1132,7 +1132,7 @@ private function _is_subsite_purge() return false; } - if (defined('LSWCP_EMPTYCACHE')) { + if (defined('LSWCP_EMPTYCACHE') && LSWCP_EMPTYCACHE) { return false; }