Purge Azure Front Door cache takes more time

Ramanarajan D 41 Reputation points
2026-07-02T08:32:19.9566667+00:00

Hello,

This image clearly shows how much time it takes to purge the Azure Front Door cache in the pipeline. Is there any way to reduce this time?

Script used to purge the cache:

az afd endpoint purge \
--resource-group $(resourceGroupName) \
--profile-name $(afdProfileName) \
--endpoint-name $(afdEndpointName) \
--content-paths '/*' \
--domains $(Domain)

User's image

Azure Front Door
Azure Front Door

An Azure service that provides a cloud content delivery network with threat protection.

0 comments No comments

1 answer

Sort by: Newest
  1. AI answer

    2026-07-02T08:32:42.2+00:00

    Azure Front Door cache purge is a global operation and its duration is largely fixed by the service; it cannot be significantly reduced from the client side.

    From the documented behavior:

    • A single cache purge operation completes within about 10 minutes across all POP locations.
    • Each purge request can include up to 100 URLs (domain + path). If more than 100 URLs are needed, batches must be submitted sequentially, waiting for each batch to complete before sending the next. Submitting a new purge while the previous one is still running causes the request to be rejected.

    In the script shown, --content-paths '/*' purges the entire endpoint, which is the most expensive type of purge and always treated as a global operation. There is no supported way to force this to complete faster.

    To reduce pipeline impact, the options are architectural rather than operational:

    1. Avoid full endpoint purges: Instead of /*, purge only the specific paths that changed (for example, /scripts/* or individual assets). This still takes up to ~10 minutes per request but reduces the need to run purges frequently.
    2. Version assets and use new URLs: Follow the recommended practice of versioning static assets (e.g., /scripts/app.v2.js). Front Door then fetches the new assets on the next request without requiring a purge.
    3. Run purge asynchronously to the main deployment: If the pipeline is waiting for the purge step to finish, consider moving it to a separate job or pipeline that can run independently, so the main deployment is not blocked.

    There is no configuration or CLI flag that shortens the global propagation time of a purge operation; the only way to reduce perceived delay is to minimize how often and how broadly cache purges are used.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

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