Skip to content

Commit

Permalink
Merge pull request #241 from pantheon-systems/release_1.4.0
Browse files Browse the repository at this point in the history
Release 1.4.0
  • Loading branch information
pwtyler authored Aug 1, 2023
2 parents 8f9f7f5 + cae9373 commit 3c63bd0
Show file tree
Hide file tree
Showing 11 changed files with 1,304 additions and 105 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Lint and Test

on: push

jobs:
validate-readme-spacing:
name: Validate README Spacing
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: pantheon-systems/validate-readme-spacing@v1
2 changes: 1 addition & 1 deletion CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @pantheon-systems/cms-platform @pantheon-systems/cms-ecosystem
* @pantheon-systems/cms-platform
21 changes: 19 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
**Tags:** pantheon, cdn, cache
**Requires at least:** 4.7
**Tested up to:** 6.2
**Stable tag:** 1.3.0
**Stable tag:** 1.4.0
**License:** GPLv2 or later
**License URI:** http://www.gnu.org/licenses/gpl-2.0.html
**License URI:** http://www.gnu.org/licenses/gpl-2.0.html

Automatically clear related pages from Pantheon's Edge when you update content. High TTL. Fresh content. Visitors never wait.

Expand Down Expand Up @@ -296,6 +296,19 @@ Different WordPress actions cause different surrogate keys to be purged, documen
* Purges surrogate keys: `rest-setting-<name>`
* Affected views: REST API resource endpoint

## Surrogate Keys for taxonomy terms ##
Setting surrogate keys for posts with large numbers of taxonomies (such as WooCommerce products with a large number of global attributes) can suffer from slower queries. Surrogate keys can be skipped for 'product' post types' taxonomy terms (or any other criteria you see fit) with the following filter:

``` php
function custom_should_add_terms($should_add_terms, $wp_query) {
if ( $wp_query->is_singular( 'product' ) ) {
return false;
}
return $should_add_terms;
}
add_filter('pantheon_should_add_terms', 'custom_should_add_terms', 10, 2);
```

## Plugin Integrations ##

Pantheon Advanced Page Cache integrates with WordPress plugins, including:
Expand All @@ -308,6 +321,10 @@ See [CONTRIBUTING.md](https://github.com/pantheon-systems/pantheon-advanced-page

## Changelog ##

### 1.4.0 ###
* Bumped Dependencies [[236](https://github.com/pantheon-systems/pantheon-advanced-page-cache/pull/236)]
* Add filter `pantheon_should_add_terms` to allow disabling surrogate keys for posts' taxonomy terms [[239](https://github.com/pantheon-systems/pantheon-advanced-page-cache/pull/239)]

### 1.3.0 (April 19, 2023) ###
* Adds support for WordPress Multisite which resolves issue where editing a Post on one subsite clears the home page cache of other sites in the Multisite install if it has a Post containing the same ID [[#228](https://github.com/pantheon-systems/pantheon-advanced-page-cache/pull/228)].

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"pantheon-systems/pantheon-wordpress-upstream-tests": "dev-master",
"phpunit/phpunit": "^9",
"phpcompatibility/php-compatibility": "^9.3",
"yoast/phpunit-polyfills": "^1.0",
"yoast/phpunit-polyfills": "^2.0",
"pantheon-systems/pantheon-wp-coding-standards": "^1.0"
},
"scripts": {
Expand Down
Loading

0 comments on commit 3c63bd0

Please sign in to comment.