Blob Caching – be careful when flushing the cache!

In the past I have written a post about Blob Caching and some of the limitations when using this method:

In a recent service request my collegue Gyorgy Homolya worked on a performance problem which affected the site always at a specific time at a day. Analyzing some memory dumps showed that requests to the site were blocking each other waiting for files to be written to the blob cache. That means that effectivly only a single request to the site was processed at a time – all others were waiting for the one being executed to finish.

With other words: for this customer we found that the Blob Cache affected the performance in a negative way rather than improving it. But why did this happen?

The reason is outlined in the following technet article:

  • Plan for caching and performance

    Before you enable the BLOB cache, carefully consider the scenario in which you plan to use it. If your site will be used for heavy collaboration, enabling the BLOB cache might temporarily affect the performance of your site while the files to be cached are first written to the disk. After the files have been stored in the cache, site performance will improve, so take this into consideration when you decide whether or not to enable the cache.

The problem occurred because the blob cache of the customer was empty and had to be refilled. Usually this should only happen once and not every day at the same time. So what was special with this customers implementation?

We found that the customer implemented a method to automatically flush the blob cache once a day. Such a method is outlined e.g. in the following articles:

Usually flushing the blob cache should only be necessary in the unlikely situation that the data on the disk is no longer in sync with the data in the database. This should only happen when restoring a backup of a database but not in normal usage scenarios. So an automatic flush of the blob cache should not be necessary.

If it is, you should raise a support case with Microsoft to analyze why the blob cache gets out of sync with the database content.

Implementing an automatic flush of the cache can cause an performance impact which is bigger than disabling blob caching at all!


  1. SharePoint blob caching is an important consideration when addressing the performance issues of blob access. SharePoint offers a very elementary form of blob caching which is disc based. It is restricted to only one WFE in the SharePoint infrastructure and does not go beyond its confines. But the reality tells us that BLOB access, with payload growing as high as terabytes, requires a much more sophisticated, distributed, in-memory, and fail-safe caching infrastructure.

    StorageEdge (a third party tool) provides precisely such a blob caching facility. It offers a unique combination of externalization and BLOB caching for effective blob management and access from a single interface. It makes use of NCache® technology to let you cache frequently used BLOBs in a distributed fashion with high availability, complete replication and failover. Details can be found at…/use-sharepoint-blob-caching-for-performance-boost

    Consider using StorageEdge if you are having blob management issues, though it is also helpful for many other matters.


  2. Hi Stefan,
    We ran into a scenario where in a SharePoint 2013 farm one Web application’s BlobCache somehow got out of Sync (content DB was not restored). Showing old images. Tried Flushing cache following below Technet article but the folder’s content in the file system seems to stay the same. Even though it says script ran successfully – anyone ran into this? Can I delete the contents manually?
    Appreciate any feedback!


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.