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/:siteIdwith 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:
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"