Enable BLOB Cache for SharePoint Websites

When accessing the sharepoint pages its very important to consider the caching facts happening around IIS. Ideally the Sharepoint site involves/refers multiple js, css, image files , etc. The better way to reduce the server roundtrip is to improve the perfomance of the server by applying a BLOB Cache.

Improving the delivery performance for the website which contains large files like images, multimedia,etc disk-based caching is one way you can achieve it. When you use this method the web front end server stores the files which needs to  cache and thus reducing the database traffic.

Modifying the web.config file like below example will be applicable to the all the site collections which falls within the web application.

Open the web.config file of the web application which you like to tweak the performance . Find the below code in the config file

< BlobCache location=”C:\blobcache” path=”\.(gif¦jpg¦png¦css¦js)$ ” maxSize=”10″ enabled=”false” />

Modify : set enabled=”true” from enabled=”false”

Location : Physical Location of the temporary files

Path : Filter for files (extension) to get included in process

MaxSize : Max. Size in GB for the files to be stored on file system

additionally we can set one more property

Max-age : (seconds) The amount of time in seconds that items should be cached on the client computer.

Note:

  • All front end web serves should have the BLOB caching enabled with same configuration
  • BLOB Caching works only for items in Sharepoint libraries
  • Changes in CSS, JS etc, might not reflect immediately. If such a case occurs then the option is to flush the cache by navigating to the site collection’s Site Settings. Select “Site Collection Object Cache” and then click “Force this server to reset its disk based cache.”

Leave a Reply

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

Bitnami