Plugin Directory

Changeset 3393532


Ignore:
Timestamp:
11/11/2025 10:11:54 AM (5 weeks ago)
Author:
ignatggeorgiev
Message:

Bump to 7.7.4

Location:
sg-cachepress/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • sg-cachepress/trunk/core/Supercacher/Supercacher_Posts.php

    r2721009 r3393532  
    136136     */
    137137    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
    138144        // Get the post.
    139145        $post = get_post( $post_id );
     
    226232        return false;
    227233    }
     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    }
    228257}
  • sg-cachepress/trunk/readme.txt

    r3388725 r3393532  
    55Requires PHP: 7.0
    66Tested up to: 6.8
    7 Stable tag: 7.7.3
     7Stable tag: 7.7.4
    88License: GPLv3
    99License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    119119== Changelog ==
    120120
     121= Version 7.7.4 =
     122Release Date: Nov 11th, 2025
     123
     124* Dynamic Cache Purge improvements
     125
    121126= Version 7.7.3 =
    122127Release Date: Nov 3rd, 2025
  • sg-cachepress/trunk/sg-cachepress.php

    r3388725 r3393532  
    1111 * Plugin URI:        https://siteground.com
    1212 * Description:       This plugin will link your WordPress application with all the performance optimizations provided by SiteGround
    13  * Version:           7.7.3
     13 * Version:           7.7.4
    1414 * Author:            SiteGround
    1515 * Author URI:        https://www.siteground.com
     
    3434// Define version constant.
    3535if ( ! defined( __NAMESPACE__ . '\VERSION' ) ) {
    36     define( __NAMESPACE__ . '\VERSION', '7.7.3' );
     36    define( __NAMESPACE__ . '\VERSION', '7.7.4' );
    3737}
    3838
Note: See TracChangeset for help on using the changeset viewer.