Skip to content
This repository has been archived by the owner on Nov 19, 2024. It is now read-only.

GraphQL caching with Fastly #6031

Merged
merged 10 commits into from
Nov 21, 2019
17 changes: 14 additions & 3 deletions guides/v2.2/cloud/cdn/configure-fastly.md
Original file line number Diff line number Diff line change
Expand Up @@ -278,11 +278,22 @@ For details on this TXT record, see the Fastly [DNS TXT record validation](https

## Upgrade the Fastly module {#upgrade}

Fastly updates the Fastly CDN for Magento 2 module to resolve issues, increase performance, and provide new features. You can find information about the latest release in the Fastly [Fastly release notes](https://github.com/fastly/fastly-magento2/releases) on GitHub.
Fastly updates the Fastly CDN for Magento 2 module to resolve issues, increase performance, and provide new features.
We recommend that you update the Fastly module in your Staging and Production environments to the latest version. See the [Fastly release notes](https://github.com/fastly/fastly-magento2/releases).

We recommend that you upgrade to the latest version of the Fastly module. See [Upgrade an extension]({{ page.baseurl }}/cloud/howtos/install-components.html):
When you update the Fastly module, you get the latest default Fastly VCL code that enables the integration with {{ site.data.var.ece }}. After you update the module, you must upload the VCL code to apply the changes to the Fastly service configuration for your Staging and Production environments.

When you upgrade the Fastly module, you get a new version of the default Fastly VCL code that enables the integration with {{ site.data.var.ece }}. You must upload the new VCL code to apply the changes to the Fastly service configuration for your Staging and Production environments.
{:.procedure}
To check the installed version Fastly CDN module for Magento 2:
keharper marked this conversation as resolved.
Show resolved Hide resolved

1. Change to the root directory of your Cloud environment.

2. Use Composer to check the installed version.

```bash
composer show *fastly*
```
3. If you do not have the [latest release]((https://github.com/fastly/fastly-magento2/releases), complete the steps to upgrade the Fastly module.

{:.procedure}
To upgrade the Fastly module:
Expand Down
10 changes: 10 additions & 0 deletions guides/v2.3/graphql/caching.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,17 @@ sub process_graphql_headers {

[Configure Varnish and your web server]({{page.baseurl}}/config-guide/varnish/config-varnish-configure.html) further describes how to configure the `default.vcl` file.

## Caching with Fastly

{{site.data.var.ece}} uses Fastly for caching. To enable GraphQL caching on Fastly:
keharper marked this conversation as resolved.
Show resolved Hide resolved

1. Upgrade the Fastly CDN Module for Magento 2.x to version 1.2.118 or higher.
meker12 marked this conversation as resolved.
Show resolved Hide resolved
1. Upload the updated VCL code to the Fastly servers.
meker12 marked this conversation as resolved.
Show resolved Hide resolved

[Set up Fastly]({{page.baseurl}}/cloud/cdn/configure-fastly.html) describes how to perform both of these tasks.

## X-Magento-Vary

The `X-Magento-Vary` cache cookie is not supported for GraphQL. The `Store` and `Content-Currency` headers, along with the content language (which is deduced) determine the context.

## Response headers
Expand Down