9
Allow option to clear cache on every build
complete
Activity
Newest
Oldest
Ben Robertson
Abhi Aiyer
Making a POST 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 a header x-runner-type: PREVIEW
Ryo Konishi
Patrick Sullivan Thanks for the updates that I really wanted!
That custom header "x-gatsby-cache" works on the specific version of Gatsby or I don't need to care about the other condition?
I added the header and try to build a gatsby app but there are still some cache remained.

Patrick Sullivan
More information on how this can be done.
This has been released in Gatsby Cloud. Documentation to follow, but for early adopters, you can use the same build hook that's exposed with your builds today and pass a header
x-gatsby-cache: false
to wipe the cache on builds.Patrick Sullivan
complete
This has been released - see https://gatsby.canny.io/ideas/p/add-a-new-webhook-endpoint-for-rebuilding-with-cache-clear for details. Thanks!
Dausdenit Adirani Delfin Patraca
Espero se ejecuté
Maciej Mortek
The same here. I'm using webhook to trigger build on changes in Strapi, but when using this webhook, Gatsby Cloud make a build with cache, which doesn't refresh queries to Strapi so the content is still the same...
Alessandro Maroso
I'm using a webhook to trigger the build of my website daily. I need a way to clear the cache and trigger the build (in the same way the "clear cache and build master" button does), instead of just triggering the build. The problem is that the graphql query results seem to be cached and the filter that i added to some queries (to filter out elements which date is in the past) is not updated.
G
Grayson Hicks
Another common similar request here is a programmatic way to run a cache clear, like passing a param to the existing Builds webhook.
Patrick Sullivan
Hi Richard - thanks for submitting an idea. What problem(s) would this help you solve?
R
Richard
Patrick Sullivan: Failed builds, third party plugins badly developed but still "work" with fully cleared cache. I'd rather have an option to have a consistent but slow build, rather than an inconsistent but fast build. Definitely an "opt in" here.
Load More
→