How to clear cache from azure frontDoor automatically after new files are deployed to origin

Sailokesh Divi 20 Reputation points Microsoft Employee
2023-07-17T21:20:55.3933333+00:00

Hello,

I have an azure front Door. I have route where cache is enabled. Each time a new deployment is made to the origin groups for that route. I want to clear cache on that route so that new js and css files are loaded.

I know there are powerShell commands to do this. Is there an arm template that supports this in azure frontDoor to automate the process

Azure Front Door
Azure Front Door
An Azure service that provides a cloud content delivery network with threat protection.
749 questions
0 comments No comments
{count} votes

Accepted answer
  1. AirGordon 7,145 Reputation points
    2023-07-17T21:50:02.0166667+00:00

    I'd suggest looking at the Deployment Script resource. You can run a PowerShell script as part of the ARM deployment.

    Clearing the cache is a data plane operation, that ARM deployments are not typically used for. Deployment Scripts provides a useful workaround to these scenarios. To look at these in action, and what else you can do, see the Bicep Registry (Bicep enhances the ARM authoring experience and compiles to the same ARM JSON)

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.