Use the max-age Attribute with BLOB Caching to Reduce the Number of Client Requests to SharePoint Servers in Sharepoint

When configuring BLOB caching for MOSS 2007 and SharePoint 2010, it is possible to specify an optional max-age attribute in the web.config element. This attribute determines the amount of time, in seconds, that SharePoint clients should cache resources locally (typically in the browser’s temporary files area) that are served from a WFE’s BLOB cache. For example, the following web.config element instructs clients to locally store .GIF and .JPG images that are retrieved from the WFE for 43,200 seconds (12 hours) before re-requesting them.

<BlobCache location="C:\blobCache" path="\.(gif|jpg)$" maxSize="10" max-age="43200" enabled="true" />

Resources that are served from a WFE’s BLOB cache when the max-age attribute is used are only re-requested after the max-age interval has elapsed or the browser’s local cache has been cleared. This reduction in client requests being made can save your WFE servers quite a bit of processing at the same time that the end-user experience is improved.

Be warned, though: if BLOB cache resources change on the server before the max-age interval has elapsed, clients that are caching those resources locally won’t see the changes. In order for clients to see the changes before the max-age interval has elapsed, a browser cache flush is necessary.

Twitter This Tip! ReTweet this Tip!


Posted Mar 08 2012, 06:00 AM by sos
Idera SharePoint Reviews SMBology, Inc. Rackspace Hosting Sponsored by Idera and SharePoint Reviews and SMBology and EPCGroup.net
Copyright 2011 SecretsOfSharePoint.com. All rights reserved.