Purge azure static web apps enterprise-grade edge (CDN) using Azure CLI

176 Views Asked by At

I enabled enterprise-edge on my Azure Static Web Apps. Is there a way to purge the enterprise-edge cache using Azure CLI?

1

There are 1 best solutions below

0
On

As of now, there is no direct support with CLI to purge the cache of static web apps according to the MSDoc. As a workaround, follow one of the below ways to meet your requirement.

  • Change the content of the file you want to delete. So that it changes and will trigger a new deployment and the CDN will cache the updated content.
  • Deploying a new version of your static web app as it will cause the CDN to refetch the files and update its cache.
  • Or if you want to remove the cache of a CDN end point which is linked to the static web app. To do so, use az afd endpoint purgeCLI command.