Changeset 3393532
- Timestamp:
- 11/11/2025 10:11:54 AM (5 weeks ago)
- Location:
- sg-cachepress/trunk
- Files:
-
- 3 edited
-
core/Supercacher/Supercacher_Posts.php (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
-
sg-cachepress.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
sg-cachepress/trunk/core/Supercacher/Supercacher_Posts.php
r2721009 r3393532 136 136 */ 137 137 public function purge_all_post_cache( $post_id ) { 138 139 // Check if the cache for that $post_id is already flushed. 140 if ( true === $this->is_post_cache_already_flushed( $post_id ) ) { 141 return; 142 } 143 138 144 // Get the post. 139 145 $post = get_post( $post_id ); … … 226 232 return false; 227 233 } 234 235 /** 236 * Limit the cache purge requests to one cache purge request per post. 237 * 238 * @param int $post_id The post id. 239 * 240 * @return boolean True if cache is already purged for that post, false if not. 241 */ 242 public function is_post_cache_already_flushed( $post_id ) { 243 244 // Collect the post_ids in a static array. 245 static $purged_post_ids = array(); 246 247 // Check if its the first time the function runs with that $post_id. 248 if ( in_array( $post_id, $purged_post_ids ) ) { 249 return true; 250 } 251 252 // Add the post_id to the static array. 253 $purged_post_ids[] = $post_id; 254 255 return false; 256 } 228 257 } -
sg-cachepress/trunk/readme.txt
r3388725 r3393532 5 5 Requires PHP: 7.0 6 6 Tested up to: 6.8 7 Stable tag: 7.7. 37 Stable tag: 7.7.4 8 8 License: GPLv3 9 9 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 119 119 == Changelog == 120 120 121 = Version 7.7.4 = 122 Release Date: Nov 11th, 2025 123 124 * Dynamic Cache Purge improvements 125 121 126 = Version 7.7.3 = 122 127 Release Date: Nov 3rd, 2025 -
sg-cachepress/trunk/sg-cachepress.php
r3388725 r3393532 11 11 * Plugin URI: https://siteground.com 12 12 * Description: This plugin will link your WordPress application with all the performance optimizations provided by SiteGround 13 * Version: 7.7. 313 * Version: 7.7.4 14 14 * Author: SiteGround 15 15 * Author URI: https://www.siteground.com … … 34 34 // Define version constant. 35 35 if ( ! defined( __NAMESPACE__ . '\VERSION' ) ) { 36 define( __NAMESPACE__ . '\VERSION', '7.7. 3' );36 define( __NAMESPACE__ . '\VERSION', '7.7.4' ); 37 37 } 38 38
Note: See TracChangeset
for help on using the changeset viewer.