Slot swapping should check if cache is ready (applicationInitialization ignored)
After we incurred some downtime in our app service due to infrastructure updates on azure storage, we implemented the local cache feature to combat this. In doing so, this meant that we had to implement slots with preview in order to warm up the cache, ensuring that it is ready to serve before swapping. In implementing this we found that we had to also implement applicationInitialization in our web config.
Our experience shows that this configuration is being ignored. So that first applyingSlotConfig and then Slotsswap operations via powershell swaps slots without ensuring that the site is ready.
Our suggestion is that during the swap process, we should actually check the environment variable
WEBSITE_LOCALCACHE_READY before swapping slots.
Alternatively, some automated way to check this would be great (via powershell). As solutions online are mostly hacks.