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

[1.0] During bootstrap, detect if plugins have changed and delete the cache #927

Merged
merged 8 commits into from
May 6, 2017

Conversation

KyleAMathews
Copy link
Contributor

We want the cache to be 100% reliable so people will rely on it (and it won't be the source of annoying bugs). This PR addresses one of the last source of cache problems where a user updates a plugin which changes some sort of data transformation algorithm so invalidates the data in the cache.

This PR is perhaps overly cautious but it's the easiest way I could think of to implement this idea and we can get more precise in the future.

Basically it looks at the version number of every installed plugin as well as computes a hash of the site's package.json, gatsby-config.js, and gatsby-node.js. If any of those have changed since the last bootstrap, then the cache is deleted.

@KyleAMathews
Copy link
Contributor Author

This commit is the guts of the PR 52c1e19

The other commits are for some quick refactors.

@gatsbybot
Copy link
Collaborator

gatsbybot commented May 6, 2017

Deploy preview ready!

Built with commit 8367110

https://deploy-preview-927--using-drupal.netlify.com

@gatsbybot
Copy link
Collaborator

gatsbybot commented May 6, 2017

Deploy preview ready!

Built with commit 8367110

https://deploy-preview-927--gatsbyjs.netlify.com

@gatsbybot
Copy link
Collaborator

gatsbybot commented May 6, 2017

Deploy preview ready!

Built with commit 8367110

https://deploy-preview-927--gatsbygram.netlify.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants