The Azure sites take a long time to re-cache and "warm up" after the deployment is complete. I want something to use Azure Devops to programmatically hit the CMS (content editor and experience editor) as well as the CD server to begin the re-caching process and make the environments usable again as quickly as possible.
1 Answer
One way to do this is to use the section in your web.config.
https://learn.microsoft.com/en-us/iis/configuration/system.webserver/applicationinitialization/
This will load the pages you define when the app starts, so if you choose those pages wisely you can fill some caches.
Example:
<system.webServer>
<applicationInitialization remapManagedRequestsTo="initializing.html" doAppInitAfterRestart="true" skipManagedModules="true">
<add initializationPage="/" hostName="www.xxx.com"/>
<add initializationPage="/en/products" hostName="www.xxx.com"/>
</applicationInitialization>