-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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] Invalidate .cache on package.json/gatsby-config.js change #862
Comments
We should also hash the I feel like perhaps we're not thinking about this correctly... need to do a rethink of this... Ooo... figured it out. We just need to do the same thing for plugins as we're already doing for data sources and graphql queries. We need to track which plugins are modifying which data nodes so when a plugin is changed, we then make that plugin reprocess those same nodes. What's really exciting about this is it could lead to hot-reloading of data transformers. So whenever you change a plugin, Gatsby reloads it and then takes all the nodes that the plugin has touched in the past and passes them through the plugin again. So hot-reloading of content, queries, and processing logic. 🎉 |
Another issue with caching: sharp don't regenerate images if I change size or quality (I need to erase |
This is a different issue potentially. Right now Sharp doesn't generate images after the initial bootstrap. So if you're trying to rewrite graphql queries while the server is running, new images won't be generated. And on re-starting, Gatsby will think that the query affecting Sharp has already been run (which it has) so won't run it again meaning images won't be generated then either. Anyways, I'll fix that today actually as it's been on my TODO list for a long while now and really needs fixed. |
Fixed by #927 🎉 |
Same problem when adding a field in the frontmatter of a markdown file (didn't know if I had to create another issue) |
@MarcCoet what are the exact steps you took here to create this problem? Are you running the latest code? |
Sorry. Completely overwhelmed these days. I am working on this project all day today. |
Not the same as the one I mentioned above but still about clearing cache manually
@KyleAMathews tell me if you are not interested in this kind of manual clear cache thing for the moment. If you are however I'll keep on posting them here unless you point me somewhere else. |
Bug description
If I add a gatsby plugin as
gatsby-transformer-json
and reload the server, nothing append (no new nodes into graphql schema)Cause
The cache (
.cache
folder) has no idea of my modification, so no need to regenerate anything.Resolution idea
The idea is to add a sha1 of
package.json
andgatsby-config.js
somewhere into.cache
to check if something change in this criticals files. Finally, unvalidate the cache on any changes.The text was updated successfully, but these errors were encountered: