Builds are cached by branch. If you want to manually clear the cache and trigger a new build you can do so by clicking on the Trigger build dropdown button and selecting the Clear cache and build option.
Clearing cache via webhook
If you need to trigger a cache clear via webhook, you can do this by making a POST request to
https://webhook.gatsbyjs.com/hooks/builds/trigger/:siteId
with the header x-gatsby-cache: false
will trigger a build with no cache. If you want to use this for previews, add an additional header: x-runner-type: PREVIEW
Using curl, the request would look like this for clearing cache on a build:
curl -X POST https://webhook.gatsbyjs.com/hooks/builds/trigger/ --header "x-gatsby-cache: false"
Comments
0 comments
Please sign in to leave a comment.