When the deleted asset represents a product no longer for sale, this can be very problematic. We definitely need more transparency and control over this feature.
Hi @bfdes, we’re planning to fix this by giving you the ability to clear out these cached deleted assets with a click. In the meantime, we can clear them out for you when you run into issues.
Hi @Zelda. I’m glad you found a workaround, but now there’s actually an easier way to clear out deleted assets. Just click the “Manual Deploy” dropdown and then “Clear build cache & deploy”. This will clear both your build cache and the cached deleted assets that Render holds on to as a fallback mechanism.
@davidClear build cache & deploy works nicely. Is there any way to invalidate cache for PR previews? We’re getting deleted files still served in previews
Indeed, clicking on the PR gets you in a page where you can do a manual deploy of the PR, and the Clear build cache & deploy is also available there.
One last question though, is there any way to set the default behavior to clear build cache & deploy for all deploys and not only perform it manually, so every automatic deploy does clean the cache?
is there any way to set the default behavior to clear build cache & deploy for all deploys and not only perform it manually, so every automatic deploy does clean the cache?
We don’t yet support this natively, but you may be able to set something up with our API endpoint for trigger deploys: Trigger a deploy. You could turn off auto-deploys on your service and instead trigger a ‘clear cache & deploy’ programmatically with the API. Other users have done things like this using GitHub actions.
Hi @jmichelgarcia, unfortunately we don’t yet have the option to clear the cache by default on every deploy. I’d encourage you to post a feature request on our feedback page (https://feedback.render.com), and include a brief description of your use case. If others upvote the feature request, we’re more likely to prioritize building this feature.