Disk-based caching is one way in which you can achieve faster processing of content stored in a Web application database. If your Web application contains large files such as images and multimedia files, enabling disk-based caching improves page delivery time because the cache stores files on the front-end Web server, thus reducing database traffic.
You can enable disk-based caching in the web.config file in the Web application to which you want to apply it. The changes you make to the web.config file will be applied to all site collections within the Web application.
Note Disk-based caching is referred to as BLOB (binary large object) caching within the web.config file.
What do you want to do?
Open the web.config file for your Web application
- Click Start, point to Administrative Tools, and then click Internet Information Services (IIS) Manager.
- In Internet Information Services (IIS) Manager, click the plus sign (+) next to the server name that contains the Web application, and then click the plus sign next to Web Sites to view the Web application(s) that have been created.
- Click the name of the Web application for which you want to configure the disk-based cache, and then double-click the web.config file.
- In the web.config Properties dialog box, on the ASP.NET tab, highlight the file location, and then press CTRL+C to copy it.
- Click Start, and then open Windows Explorer.
- Click in the Address box, and then press CTRL+V to paste the location of the web.config file into the box.
- Click Go to open the web.config file.
Note If you see a dialog box that says that Windows cannot open the file, click Select the program from a list, and then click OK. In the Open With dialog box, click Notepad, and then click OK.
Top of Page
Enable and configure the disk-based cache
Important Before you make changes to the web.config file, make a copy of it by using a different name (for example, web.config1), so that if a mistake is made in the file, you can delete it and use the original file.
- In the web.config file, find the following line:
<BlobCache location="C:\blobCache" path="\.(gif|jpg|png|css|js)$" maxSize="10" enabled="false"/>
- In this line, change the
- To change the size of the cache, type a new number for
. The size is expressed in gigabytes (GB), and 10 GB is the default.
- If the directory that is specified in the
parameter does not have enough space to accommodate the cache size, you can type a new directory for the location.
- To add new file types to the BLOB cache, type the file type next to the other file types. Separate each file type with a pipe (|) character as shown in the file.
- Save the file, and then close it.
Top of Page