how to send cache-control header in front door premium cache

Vishal Shah 20 Reputation points
2025-01-30T06:55:53.14+00:00

I want to set cache control header in front door premium routes.

I am not able to do it, can someone explain where can i add cache control header

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

1 answer

Sort by: Most helpful
  1. Deepanshu katara 12,965 Reputation points
    2025-01-30T07:59:42.3633333+00:00

    Hello Vishal , Welcome to MS Q&A

    To set the cache control header in Azure Front Door Premium routes, you can use the Cache-Control response headers to specify how long an item should be stored in the cache. Here's the order of precedence for cache duration:

    1. Cache-Control: s-maxage=<seconds>
    2. Cache-Control: max-age=<seconds>
    3. Expires: <http-date>

    If the Cache-Control header is not present in the response from the origin, Azure Front Door will randomly determine a cache duration between one and three days by default. Additionally, certain Cache-Control values, such as private, no-cache, and no-store, indicate that the response should not be cached.

    Make sure your caching configuration aligns with the type of content being served, as not all content is suitable for caching. For more detailed guidance, you can refer to the Azure Front Door caching documentation.

    Please let us know if any ques

    Kindly accept if it helps

    Thanks

    Deepanshu


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.