Skip to content
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

fix(gatsby-plugin-offline): Update regex to catch new static query results #26329

Merged
merged 2 commits into from
Aug 10, 2020

Conversation

sidharthachatterjee
Copy link
Contributor

As a result of #26242, static query results are now stored in /public/page-data/sq/

This PR adjusts the glob in gatsby-plugin-offline so that caches these files as well.

@sidharthachatterjee sidharthachatterjee requested a review from a team as a code owner August 10, 2020 10:43
@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Aug 10, 2020
@sidharthachatterjee sidharthachatterjee added type: bug An issue or pull request relating to a bug in Gatsby and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Aug 10, 2020
@gatsbyjs gatsbyjs deleted a comment from gatsby-cloud-staging bot Aug 10, 2020
@gatsbyjs gatsbyjs deleted a comment from gatsby-cloud bot Aug 10, 2020
@gatsbyjs gatsbyjs deleted a comment from gatsby-cloud bot Aug 10, 2020
@gatsbyjs gatsbyjs deleted a comment from gatsby-cloud bot Aug 10, 2020
Copy link
Contributor

@wardpeet wardpeet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you augment the comment and also you should be able to remove

      {
        // app-data.json is not content hashed
        urlPattern: /^https?:.*\/page-data\/app-data\.json/,
        handler: `StaleWhileRevalidate`,
      },

@@ -140,7 +140,7 @@ exports.onPostBuild = (
},
{
// page-data.json files are not content hashed
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// page-data.json files are not content hashed
// Files inside page-data folder are not content hashed (page-data, app-data, static-queries).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, yes. Great catch!

@gatsby-cloud
Copy link

gatsby-cloud bot commented Aug 10, 2020

Gatsby Cloud Build Report

gatsby

🎉 Your build was successful! See the Deploy preview here.

Build Details

View the build logs here.

🕐 Build time: 36m

Copy link
Contributor

@wardpeet wardpeet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks works as expected!

@sidharthachatterjee sidharthachatterjee added the bot: merge on green Gatsbot will merge these PRs automatically when all tests passes label Aug 10, 2020
@gatsbybot gatsbybot merged commit 75ab9b8 into master Aug 10, 2020
gatsbybot pushed a commit that referenced this pull request Aug 10, 2020
…ox config (#26295)

* Updated gatsby-plugin-offline README with correct default workbox config

* Update for #26329

Co-authored-by: Sidhartha Chatterjee <me@sidharthachatterjee.com>
@LekoArts LekoArts deleted the fix/static-queries-caching branch November 9, 2020 08:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot: merge on green Gatsbot will merge these PRs automatically when all tests passes type: bug An issue or pull request relating to a bug in Gatsby
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants