WFE Caching (BLOB)

Blob Cache (Part I)

In SharePoint Server 2010 you can enable BLOB cache. BLOB cache is a disk-based caching which will increase browser performance and reduce database loads. SharePoint will load the files directly from its harddrive rather than performing an expensive SQL query to retrieve the data from the SQL server.

 When a site is rendered the first time all files associated with that site will be copied to the local harddrive and stored in a cache. All request for this website after the initial request will be retrieved directly from the harddrive instead of the SQL server.

Configuration

In order to enable the BLOB cache for a web application we need to do the following:

  • Open the web.config file for the web application on which you want to enable BLOB caching
  • Find the line starting with “<BlobCache location=”

The line will look something like this :

<BlobCache location=”C:BlobCache” path=”.(gif|jpg|jpeg|jpe|jfif|bmp|dib|tif|tiff|ico|png|wdp|hdp|css|js|asf|avi|flv|m4v|
mov|mp3|mp4|mpeg|mpg|rm|rmvb|wma|wmv)$” maxSize=”10″ enabled=”true” />

  • First we need to ensure is that enabled is set to true  (enabled=”true”). This enables the functionality.
  • Then we need to define where to store the cache which is determined by the location parameter ( location=”C:BlobCache”) in this example the cache will be stored at on the C: partition. It is generally not recomended to store the blob cache on the c: partition where Windows is installed. If possible the cache should be put on a SSD or 15000rpm disk.
  • We then set the maximum size for the BLOB cache with the parameter maxSize  (maxSize=”10″ ). The default size is 10 GB
  • Lastly we can alter the file extensions which are to be stored in the cache by adding their exstensions to the path variable (path=”.(gif|jpg|…)

Tags: , , , ,

Leave a comment