Hey Robert, I was wondering as I am trying your caching solution, isn't gatsby-source-filesystem already caching the images? I just tested it and for me it already caches the them.
I was contacted by Kyle Mathews saying the same thing. In the majority of situations Gatsby seems to cache and check itself. My version is 'slightly' faster, and handles the unlikely edge case of servers not using etags.
Interesting. Also I guess it could be useful to write some custom caching, to persist the image-cache over gatsby. So if gatsby clears its cache, it will still be there. This would be interesting for peeps with gigabytes of Media-Files on their WordPress, who want to make sure, that they never ever have pull everything in again.
I'll update some info in this post. Thanks for the explanation.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I needed my build to cache images so I adapted your resolver. I have written a walk through - hopefully it can help you like you helped me!
thoughtsandstuff.com/gatsby-with-w...
Anyhow, we can implement this kind of cache for posts as well? Rebuilding unchanged pages increases build time for larger blogs
You can use the new gatsby-source-wordpress@v4 which already does a lot of work for you when it comes to incremental builds.
github.com/gatsbyjs/gatsby-source-...
Super nice. If I may I'll reference your article, so people won't miss on this.
No worries. Just link back!
Hey Robert, I was wondering as I am trying your caching solution, isn't
gatsby-source-filesystem
already caching the images? I just tested it and for me it already caches the them.I was contacted by Kyle Mathews saying the same thing. In the majority of situations Gatsby seems to cache and check itself. My version is 'slightly' faster, and handles the unlikely edge case of servers not using etags.
The conversation: twitter.com/robertmars/status/1172...
I suppose it depends on your environment. I quite like skipping the server checks, as it seems like an extra step.
Interesting. Also I guess it could be useful to write some custom caching, to persist the image-cache over gatsby. So if gatsby clears its cache, it will still be there. This would be interesting for peeps with gigabytes of Media-Files on their WordPress, who want to make sure, that they never ever have pull everything in again.
I'll update some info in this post. Thanks for the explanation.