Increase your (Sitecore) performance by enabling the local cache on Azure App Services

Although this blog focuses primarily on Sitecore, this blogpost is applicable for any application which is hosted on an Windows Azure App Service.

The file system,which is used by Azure App Services, always points to D:\home, but it is in fact a link to a (slow) performing share. Sitecore can greatly benefit from enabling a local cache, this blogpost describes how to enable this cache.

Important to know, is that the app service canĀ write to it’s cached folder, but after an application restart, or after a new deployment, all these changes are discarded.

The first step is to set the following application setting:


this will enable the local cache. It copies the shared wwwroot to the D:\home\wwwroot folder, but it has a limitation: by default, only 300MB will be transferred locally. As Sitecore surpasses this amount easily (a fresh Sitecore 9.1 installation takes over 1Gb of storage), this amount has to be increased. This amount can be altered by adding the following setting:


The amount of 2000 is the current maximum, but is enough for a Sitecore installation.

When working with a local cache, problems may arise with local stored media items: They are not shared anymore, but there is an excellent solution by Per Osbeck, which can be found over here.

Don’t configure this on your staging slot

A second important note is not to configure this on your staging slot: as you want to test clean deployments, this local cache shouldn’t be enabled on the staging slots, but only on your production slot; this means that you need to create a slot specific setting, which ties to your production environment. The problem in here is that slot specific settings cause an application recycle, but there is a solution for that in my next blogpost – How to warmup your application before swapping slots in blue-green scenarios.

More information regarding this subject can be found on this MSDN page

3 thoughts on “Increase your (Sitecore) performance by enabling the local cache on Azure App Services

  1. strategies for marketing

    u=[some crazy string]&id=[another crazy string]While you’re looking with
    the forms, you may want to spend time customizing the signup process then it matches
    your website. Don’t spend your time filling your auto-responder with names should you don’t have any content ready for them.

    Let’s say your niche is gardening, you might write on soil, weeding,
    planting fertilizer to work with, best points in the year to grow,

  2. Arden

    This was actually deployed on our staging server before we got to the bottom of this article in a quick attempt to speed up our Sitecore instance. I now have an issue. After setting up these application settings the CM server has now crashed. I have no idea how to remedy this. Any thoughts?


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.