Cache Rule for Home Page

Category: azure cdn

Question

WesleyTTTTBoom on Wed, 24 Apr 2019 19:49:00


Hello

I would like to configure Azure CDN to bypass cache on all pages except the top level domain page (Home Page or '/') and the media asset folder (/assets). I set the default cache policy to No Cache and then created two custom rules. I was able to create the rule for the assets folder with  "/assets/*" but getting a validation exception when trying to set the cache rule for "/". Has anyone been able to create a cache rule for the top level domain page "Home" with a custom cache rule?

Thanks

Replies

msrini - MSFT on Thu, 25 Apr 2019 06:36:47


Hi Wesley, 

When you provide only "/" in the match values, there is a validation error stating this is not allowed. As a workaround, can you provide "/default.html" path? 

I mean, provide the entire default path over there and try if that helps. 

Let me know if you have any questions. 

Regards, 

Msrini

WesleyTTTTBoom on Mon, 29 Apr 2019 14:25:44


If 80% of the traffic goes to www.mywebsite.com then putting in a rule for www.mywebsite.com/default.html wouldn't help because nobody will actually browse to that page. People just go to the main domain so I don't think that rule will help overall application performance. Does that make sense?

msrini - MSFT on Mon, 29 Apr 2019 19:36:33


Yeah, it does make sense. But you will not be able to use / in the rule as of now. I can follow up on this get back to you. 

Regards, 

Msrini