Migrate to Netlify Today

Netlify announces the next evolution of Gatsby Cloud. Learn more

Debugging Cache Issues

There can be certain scenarios in which the Gatsby caching mechanism appears to fail, which can lead to issues like:

  • Content not appearing when it should
  • Changes to plugin source code not appearing to be invoked appropriately

and more! If you’ve found yourself writing a script like:

consider utilizing the gatsby clean command which can help resolve caching issues for you.

First make sure the version of gatsby specified in your package.json dependencies is at least 2.1.1, and then make the following change to package.json:

Now when issues arise that seem to be related to caching, you can use npm run clean to wipe out the cache and start from a fresh slate.

Note: If you find yourself using this command regularly, consider helping us out and responding to our GitHub Issue with clear reproduction steps.

Start building today on Netlify!
Edit this page on GitHub
© 2023 Gatsby, Inc.