Friday, June 29, 2012

BLOB Cache

This is a feature for Microsoft SQL Server and this is designed to move the storage of binary large objects (BLOB) from database server to a disk storage location. It reduces the database load and increases the browser performance. It is very useful for frequently used images, audio, video and other media type files. The BLOB cache is enabled in front-end server and improves the performance by retrieving the BLOB files from database to a directory. This reduces the network traffic between SharePoint and database server.

Before use BLOB cache we have to well plan weather this will improve performance or not. If most of the files in a site are static, the files are not getting updated frequently and it contain many read-only media files, enabling BLOB cache will improve the performance.

You must specify a storage location to store the files in the front-end web server. The storage location should have enough disk space to store the cache. And also select a drive that will be used by few processes as possible.

The BLOB caching is done at the Web application level. All the site collections under the web applications will be effected. By default the BLOB cache is off.

To configure BLOB cache 
1.       Open IIS in the SharePoint server and click on the specific web application 
2.       Right click on the name of the web application and click Explorer.
3.       Open the web.config file. Before make changes to the web.config file. It is good to keep a copy of that.
4.       Find the tag and change the attributes 
5.       Change the location attribute to specify the directory to cache the files.
       Ex: location="C:\BLOB"
       Microsoft recommends specifying a directory that is not the same drive as the Operating System runs.  
6.       For the path attribute modify the regular expression to add/remove file extension. These types of files will be cached at the specified location. 
7.       maxSize is the maximum allowable size of the disk based cache in GBs. 10 GB is the default size. 
8.       enabled attribute enable/disable the cache. Set it to true. 
9.    max-age specify the maximum amount of time in seconds that the client browser caches BLOB. The default value is 86400 seconds (24 hours). 
10.   Save the web.config file.

Your BlobCache tag looks like this

<BlobCache location="C:\BLOB"
              enabled="true" />

When you change the web.config file, the web application in IIS automatically recycles. The recycling can cause some interruption in the services to sites contained in that web application.

After the recycling process, if you go the directory you specified in the location attribute (C:\BLOB), you will see some set of files like Change.bin, dump.bin, flushcount.bin, etc.. This files contain information about the cached files.

To do the test on BLOB cache 
1.      Upload a .wmv file to the Shared Documents library. 
2.      Try to download the file to the client computer. 
3.      Go to the location directory (C:\BLOB). You can see the file is stored in this location. In my case my site collection name is ‘Test 1’ and I upload the documents to Shared Documents. The .wmv file stored in ..\ SITES\TEST1\SHARED DOCUMENTS

Every time when a new file rendered from database, it will be stored in the disk drive. The .bin files will get updated with index and other metadata information.

Once you upload a file to a library you will not find the file in the disk drive immediately. It will be stored to the disk only when you start download. And the file will be there for the time period specified in the max-age attribute.


  1. The information about BLOB cache is described in this blog very well. In this blog people know about BLOB cache very easily.
    check it for more things.

  2. This comment has been removed by the author.

  3. Helpful post. You've done marvellous job! Keep updating. Many students need help in their homework and assignments.They wants to get best online site where they can learn essentials tips relevant to their subject. We provide the best physical chemistry homework help available online.

  4. A forum of the Mohamed Akbar is best to learn about the SQL server service with the best offers. You can now configure the BLOB cache with some steps defined in this article. With the helpful link you can use it for the best purposes.

  5. I think this would be a easy quiz. It is not because I am good at analog transmission but this subject is really easy. website that is very helpful for the academic papers writing.

  6. I love to read blog and I got this but I have some advice for you to try to write more words content to get more value from your users. like this on go on this website

  7. This comment has been removed by the author.

  8. We know the Microsoft SQL Server and we know how it really works. Sometims there we see some huge database and it will create problem and then this BLOB cache will help you to transfer it to another place. You can fine more update here about academic papers writing.

  9. I have found your article very interesting.So, keep updating. Students are often confused in how to make their waiver letter as impressive as required. Must visit site and get ideas.