-
Notifications
You must be signed in to change notification settings - Fork 123
GraphQL Lacking Stale Content Delivery Time Implementation #559
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Released in 1.2.186. |
@vvuksan please see my comments on the commit, this PR is only half the solution to the mentioned problem, as |
@AntonEvers stale-if-error will be added. |
This has been released in 1.2.187. |
MickaelDatadome
pushed a commit
to DataDome/fastly-magento2
that referenced
this issue
Oct 5, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As a GraphQL consumer using Fastly I want to receive stale content for a specific amount of time after cache invalidation so that I get fast responses more often and so that I do not have to wait for a slower origin request every time cache is invalidated, also in case of server failure.
AC
stale-while-revalidate
will be sent in GraphQL response headercache-control
from Adobe Commercestale-while-revalidate
will be equal to the configuration fieldfull_page_cache/fastly/fastly_advanced_configuration/stale_ttl
titled Stale Content Delivery Timestale-if-error
will be sent in GraphQL response headercache-control
from Adobe Commercestale-if-error
will be equal to the configuration fieldfull_page_cache/fastly/fastly_advanced_configuration/stale_error_ttl
titled Stale Content Delivery Time in Case of Backend Error\Fastly\Cdn\Model\Layout\LayoutPlugin::afterGenerateElements
but then for GraphQL requests.Approved Schema
Technical direction
Recommendation to build this as a plugin to \Magento\Framework\App\Response\Http::setPublicHeaders, right after \Magento\GraphQlCache\Controller\Plugin\GraphQl::afterRenderResult is called.
See vendor/magento/module-graph-ql-cache/etc/graphql/di.xml as example:
Note that this plugin only applies to the GraphQL area.
The text was updated successfully, but these errors were encountered: