-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(gatsby-source-drupal): Disable caching + add http/2 agent (#32012)…
… (#32038) * feat(gatsby-source-drupal): Force revalidation on Drupal API requests Talking to Gatsby/Drupal users — most set long max-age for the Drupal cache to keep their edge http cache as fresh as possible as Drupal can directly purge its edge http cache. But this has the unfortunate side-effect with the recent http client change in #31514 that API calls aren't revalidated. Meaning that a user could change some content in Drupal and not see those updates in their Gatsby site until the Drupal cache expires in the Gatsby cache. This PR removes the `cache-control` header from Drupal API responses so that we only can use `etag` for caching which forces revalidation on every request. * Remove debugging line * Add http/2 agent * Disable cache — it's slower than refetch with revalidation * push don't concat * consistent return * Fix statusCode check for got * Actually this was correct... * Actually use http/2 (cherry picked from commit 113e43e) # Conflicts: # packages/gatsby-source-drupal/package.json Co-authored-by: Kyle Mathews <mathews.kyle@gmail.com>
- Loading branch information
1 parent
65e04d2
commit b33f5fe
Showing
3 changed files
with
46 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters