Pages

Thursday, November 1, 2012

Configuring Sharepoint BLOB cache settings for a web application


To improve the end user response time a good approach is to configure the BLOB Cache on the SharePoint 2010 Web Front End (WFE) servers. The BLOB cache caches files on the WFEs disk to make it faster for IIS to retrieve the files and return them to the browser. It can also send some HTTP headers telling the browser to cache the file for a certain amount of time. By default, the disk-based BLOB cache is off and must be enabled on the front-end Web server if you want to use it. Use the following procedure to configure disk-based cache settings for a Web application.


1. Click Start, point to Administrative Tools, and then click Internet Information Services (IIS) Manager.

2. In Internet Information Services (IIS) Manager, in the Connections pane, click the plus sign (+) next to the server name that contains the Web application, and then click the plus sign next to Sites to view the Web application or applications that have been created.

3. Right-click the name of the Web application for which you want to configure the disk-based cache, and then click Explore. Windows Explorer opens, with the directories for the selected Web application listed.

4. Right-click web.config, and then click Open.

5. If the Windows dialog box appears, select Select a program from a list of installed programs, and then click OK.

6. In the Open With dialog box, click Notepad, and then click OK.

7. In the web.config Notepad file, find the following line: 
<BlobCache location="" 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="false" />

8. In this line, change the location attribute to specify a directory that has enough space to accommodate the cache size.To change the size of the cache, type a new number for maxSize. The size is expressed in gigabytes (GB), and 10 GB is the default. To enable the BLOB cache, change the enabled attribute, from "false" to "true".Save the Notepad file, and then close it.


Important 

- Before you make changes to the web.config file, make a copy of it by using a different name, so that if a mistake is made in the file, you can restore the original file.
- Verify that you have the following administrative credentials: You must be a member of the Administrators group on the local computer to configure the BLOB cache settings.
- When you save a change to the web.config file, the Web application in Internet Information Services (IIS) 7.0 automatically recycles. This recycling can cause a brief interruption in service to sites contained in that Web application, and users can lose session state.
- It is strongly recommend that you specify a directory that is not on the same drive as where either the server operating system swap files or server log files are stored.
- To add or remove file types from the list of file types to be cached, for the path attribute, modify the regular expression to include or remove the appropriate file extension. If you add file extensions, make sure to separate each file type with a pipe (|), as shown in this line of code. 
- It is recommended that you not set the cache size smaller than 10 GB. When you set the cache size, make sure to specify a number large enough to provide a buffer at least 20 percent bigger than the estimated size of the content that will be stored in the cache.




No comments:

Post a Comment