Option to disable cache?

Hi,

On a certain branch deploy (dev/test environment) I’d like to disable caching. Is this somehow possible without having to manually trigger the “Clear cache and retry with latest branch commit” button?

It would come in handy if this was possible, and we could add this in netlify.toml under [context].

Gr,

Andy

No such option, but you can delete Netlify’s cache directory before the cache is saved using build plugins: Create Build Plugins | Netlify Docs

I’ll give it a try @hrishikesh, but do you have any idea why this branch-deploy isn’t clearing the cache, even while I use the “Clear cache and deploy site” button?

That sounds unlikely. Please share a deploy link where you tried to clear cacne but that didn’t work.

Hey @hrishikesh, sorry really a late reply.

When I check a deploy preview link it’s no problem, but the actual production environment isn’t updated.
I’ve cleared all cache, used private browsing, nothing helps.

Site ID: 0e3356e3-6bc6-4270-a8ce-1ac9b4b2aa74

Gr,

Andy

Just to confirm, are we talking about browser cache, or the build cache? The former is not controlled by the clear cache button.

I’m aware of the difference, I meant build cache. :slight_smile: