Plugin Directory

Changeset 3094176


Ignore:
Timestamp:
05/28/2024 09:29:57 PM (22 months ago)
Author:
getpantheon
Message:

update changelog

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pantheon-advanced-page-cache/trunk/readme.txt

    r3094130 r3094176  
    161161When the cache max age is filtered in this way, the admin option is disabled and a notice is displayed.
    162162
     163= Setting the Cache Max Age with a filter =
     164
     165The cache max age setting is controlled by the [Pantheon Page Cache](https://docs.pantheon.io/guides/wordpress-configurations/wordpress-cache-plugin) admin page. As of 2.0.0, there are three cache age options by default — 1 week, 1 month, 1 year. Pantheon Advanced Page Cache automatically purges the cache of updated and related posts and pages, but you might want to override the cache max age value and set it programmatically. In this case, you can use the `pantheon_cache_default_max_age` filter added in [Pantheon MU plugin 1.4.0+](https://docs.pantheon.io/guides/wordpress-configurations/wordpress-cache-plugin#override-the-default-max-age). For example:
     166
     167    add_filter( 'pantheon_cache_default_max_age', function() {
     168        return 10 * DAY_IN_SECONDS;
     169    } );
     170
     171When the cache max age is filtered in this way, the admin option is disabled and a notice is displayed.
     172
     173= Setting the Cache Max Age with a filter =
     174
     175The cache max age setting is controlled by the [Pantheon Page Cache](https://docs.pantheon.io/guides/wordpress-configurations/wordpress-cache-plugin) admin page. As of 2.0.0, there are three cache age options by default — 1 week, 1 month, 1 year. Pantheon Advanced Page Cache automatically purges the cache of updated and related posts and pages, but you might want to override the cache max age value and set it programmatically. In this case, you can use the `pantheon_cache_default_max_age` filter added in [Pantheon MU plugin 1.4.0+](https://docs.pantheon.io/guides/wordpress-configurations/wordpress-cache-plugin#override-the-default-max-age). For example:
     176
     177    add_filter( 'pantheon_cache_default_max_age', function() {
     178        return 10 * DAY_IN_SECONDS;
     179    } );
     180
     181When the cache max age is filtered in this way, the admin option is disabled and a notice is displayed.
     182
    163183== WP-CLI Commands ==
    164184
     
    350370The above example would disable _only_ the admin notice recommending a higher cache max age.
    351371
     372== Other Filters ==
     373
     374= pantheon_apc_disable_admin_notices =
     375Since 2.0.0, Pantheon Advanced Page Cache displays a number of admin notices about your current cache max age value. You can disable these notices with the `pantheon_apc_disable_admin_notices` filter.
     376
     377    add_filter( 'pantheon_apc_disable_admin_notices', '__return_true' );
     378
     379Alternately, the function callback is passed into the `pantheon_apc_disable_admin_notices` filter, allowing you to specify precisely _which_ notice to disable, for example:
     380
     381    add_filter( 'pantheon_apc_disable_admin_notices', function( $disable_notices, $callback ) {
     382        if ( $callback === '\\Pantheon_Advanced_Page_Cache\\Admin_Interface\\admin_notice_maybe_recommend_higher_max_age' ) {
     383            return true;
     384        }
     385        return $disable_notices;
     386    }, 10, 2 );
     387
     388The above example would disable _only_ the admin notice recommending a higher cache max age.
     389
     390== Other Filters ==
     391
     392= `pantheon_apc_disable_admin_notices` =
     393Since 2.0.0, Pantheon Advanced Page Cache displays a number of admin notices about your current cache max age value. You can disable these notices with the `pantheon_apc_disable_admin_notices` filter.
     394
     395    add_filter( 'pantheon_apc_disable_admin_notices', '__return_true' );
     396
     397Alternately, the function callback is passed into the `pantheon_apc_disable_admin_notices` filter, allowing you to specify precisely _which_ notice to disable, for example:
     398
     399    add_filter( 'pantheon_apc_disable_admin_notices', function( $disable_notices, $callback ) {
     400        if ( $callback === '\\Pantheon_Advanced_Page_Cache\\Admin_Interface\\admin_notice_maybe_recommend_higher_max_age' ) {
     401            return true;
     402        }
     403        return $disable_notices;
     404    }, 10, 2 );
     405
     406The above example would disable _only_ the admin notice recommending a higher cache max age.
     407
    352408== Plugin Integrations ==
    353409
     
    363419= 2.0.0 (28 May 2024) =
    364420* Adds new admin alerts and Site Health tests about default cache max age settings and recommendations [[#268](https://github.com/pantheon-systems/pantheon-advanced-page-cache/pull/268), [#271](https://github.com/pantheon-systems/pantheon-advanced-page-cache/pull/271)]. The default Pantheon GCDN cache max age value has been updated to 1 week in the [Pantheon MU plugin](https://github.com/pantheon-systems/pantheon-mu-plugin). For more information, see the [release note](https://docs.pantheon.io/release-notes/2024/04/pantheon-mu-plugin-1-4-0-update).
    365 * Updated UI in Pantheon Page Cache admin page when used in a Pantheon environment (with the Pantheon MU plugin). [[#272](https://github.com/pantheon-systems/pantheon-advanced-page-cache/pull/272)]
     421* Updated UI in Pantheon Page Cache admin page when used in a Pantheon environment (with the Pantheon MU plugin). [[#272](https://github.com/pantheon-systems/pantheon-advanced-page-cache/pull/272)] This UI change takes effect when [Pantheon MU plugin version 1.4.3](https://docs.pantheon.io/release-notes/2024/05/pantheon-mu-plugin-1-4-3-update) is available on your site.
    366422* Automatically updates the cache max age to the recommended value (1 week) if it was saved at the old default value (600 seconds). [[#269](https://github.com/pantheon-systems/pantheon-advanced-page-cache/pull/269)]
    367423* Adds a hook into the `nonce_life` filter when nonces are created on the front-end to set the `pantheon_cache_default_max_age` to less than the nonce lifetime to avoid nonces expiring before the cache does. [[#282](https://github.com/pantheon-systems/pantheon-advanced-page-cache/pull/282)] props [@ryanshoover](https://profiles.wordpress.org/ryanshoover/)
     
    450506
    451507= 1.3.0 =
     508= 1.3.0 =
     509This version also automatically updates the cache max age (set in the [Pantheon Page Cache settings](https://docs.pantheon.io/guides/wordpress-configurations/wordpress-cache-plugin)) to the recommended value (1 week) if it was saved at the old default value (600 seconds). If the cache max age was set to any other value (or not set at all), it will not be changed. A one-time notice will be displayed in the admin interface to inform administrators of this change.
     510
     511= 1.3.0 =
    452512Note that the Pantheon Advanced Page Cache 1.3.0 release now prefixes keys on a WordPress Multisite (WPMS) with the blog ID. For users who already have this plugin installed on a WPMS, they will need to click the Clear Cache button on the settings page to generate the prefixed keys.
Note: See TracChangeset for help on using the changeset viewer.