Skip to content

Commit

Permalink
Update the header name in caching docs for FES starter kits (#8775)
Browse files Browse the repository at this point in the history
  • Loading branch information
CobyPear authored Nov 13, 2023
1 parent 9afcd38 commit 446811f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ The Front-End Sites starter kits use Next.js 13 and the Pages Router. The instru
The recommended caching configurations are automatically enabled if you created your Drupal site using the [Drupal + Next.js frontend starter project](/guides/decoupled/drupal-nextjs-frontend-starters/create).

The `PantheonDrupalState` class from the `@pantheon-systems/drupal-kit` npm
package includes an adapted fetch method that adds the `Fastly-Debug` header
package includes an adapted fetch method that adds the `Pantheon-SKey` header
to each request sent to Drupal. Responses from Drupal contain the
`Surrogate-Key` header. You can use these keys to instruct your frontend to purge content from a cache when the content in Drupal changes.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ The information in this section uses WordPress with the plugins below installed:
- [Pantheon Advanced Page Cache plugin](https://wordpress.org/plugins/pantheon-advanced-page-cache/)


The `GraphqlClientFactory` class from our `@pantheon-systems/wordpress-kit` npm package adds the `Fastly-Debug` header to each request and uses the GET method by default to take advantage of WPGraphQL Smart Cache network caching. Responses from WordPress will contain the `Surrogate-Key` header. You can use these keys to instruct your frontend to purge content from a cache when the content in WordPress changes.
The `GraphqlClientFactory` class from our `@pantheon-systems/wordpress-kit` npm package adds the `Pantheon-SKey` header to each request and uses the GET method by default to take advantage of WPGraphQL Smart Cache network caching. Responses from WordPress will contain the `Surrogate-Key` header. You can use these keys to instruct your frontend to purge content from a cache when the content in WordPress changes.

## Cache-Control Headers

Expand Down Expand Up @@ -102,7 +102,7 @@ The Decoupled Kit [WordPress Backend Starter Project](/guides/decoupled/wp-backe

1. Verify that the WordPress backend has the [Pantheon Advanced Page Cache plugin](https://wordpress.org/plugins/pantheon-advanced-page-cache/) installed and configured.

1. Review your route fetches data and confirm that it uses the `@pantheon-systems/wordpress-kit` Graphql client or requests to WordPress are made using the GET method and include the `Fastly-Debug: 1` header. You must use the `client.rawRequest()` method to see headers.
1. Review your route fetches data and confirm that it uses the `@pantheon-systems/wordpress-kit` Graphql client or requests to WordPress are made using the GET method and include the `Pantheon-SKey: 1` header. You must use the `client.rawRequest()` method to see headers.

1. Confirm that headers are added to the outgoing response from Next.js in
`getServerSideProps` (refer to [`context.res`](https://nextjs.org/docs/api-reference/data-fetching/get-server-side-props#context-parameter)).
Expand Down

0 comments on commit 446811f

Please sign in to comment.