FrontDoor not honoring cache header

Schmidt, Robert (external) 21 Reputation points
2022-03-11T07:27:20.453+00:00

We are using FrontDoor in front of an AppService.
The App Service is providing Cache Headers to tell FrontDoor how long it should cache the page in the edge node.
FrontDoor is configured as use default cache duration true so it should honor cache header according to the documentation (https://learn.microsoft.com/en-us/azure/frontdoor/front-door-caching?pivots=front-door-classic#cache-expiration)
182088-image.png

We have pages sending the following cache header:
Cache-Control: s-maxage=1800, stale-while-revalidate
The page should be invalidated after 30 min. But what we experience is that the page is not even invalidated after 3 days!
We know that front door makes no guarantees
182126-image.png
but with this gap front door is not usable for us.
Are there any experiences with this behavior or are we missing something?

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

1 answer

Sort by: Most helpful
  1. ChaitanyaNaykodi-MSFT 27,476 Reputation points Microsoft Employee Moderator
    2022-03-16T02:36:03.777+00:00

    Hello @Schmidt, Robert (external) ,

    I got a response back from the team. This is an expected behavior the page will not be revalidated as stale-while-revalidate is not supported by Azure Front Door yet. The team will likely add support for this scenario in future, but currently no timeline has been finalized yet. Meanwhile please feel free to create a feature request for this scenario on our feedback portal. You can also upvote this feature request for the AFD Standard/Premium.

    As per current behavior only the s-maxage, max-age values of Cache-Control header will be honored by Azure Front Door.

    Hope this helps! Please let me know if you have any additional questions. Thank you!

    0 comments No comments

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.