关于MOSS 2007 Blob caching

Blob caching allows caching of binary objects like images, style sheets and documents on the MOSS front end server machine which heavily reduces the traffic to the SQL backend server as each file has to be downloaded only once to the blob cache per frontend server.

 

The benefit is that although the items are now retrieved from the MOSS 2007 frontend server the same security and versioning capabilities exist as if the file would only live in the SQL backend database. The blob cache mechanism also ensures that an item in the cache is invalided as soon as the file changes in the backend database. So that is different from other file caches like proxy servers and browser caches.

 

To enable blob caching you need to modify only one line in the web.config file:

 
 
<BlobCache location="C:\blobCache" path="\.(gif|jpg|png|css|js)$" maxSize="10" enabled="false"/>

 

Just change the false in the enabled attribute to true and update the location attribute to point to a location where sufficient disk space is available. For best performance ensure to set the maxSize attribute to a value that is at least as big as all binary objects in your Web Application.

 

You can control which file types are cached by modifying the file extension list in the path attribute.

 

Responsible for the processing of the disk caching logic is the following entry in HttpModules section of the web.config file:

 
 
 
 

<add name="PublishingHttpModule" type="Microsoft.SharePoint.Publishing.PublishingHttpModule,

Microsoft.SharePoint.Publishing, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />

 

This HttpModule implements the required logic that decides whether a file can be served from the disk cache or if it has to be retrieved from the backend database.

 

Important to know is that even that this HttpModule is located in the WCM Publishing namespace, you should know its functionality is not limited to publishing sites. Other site collection types like team sites can also use this functionality.

 

Limitations of Blob Caching

 

1) Blob caching does not support web gardening

One major limitation is that blob caching should not be used with web gardening. The reason is that each process requires exclusive access to it's instance of the blob cache. That means that only one worker process can access a single instance of the blob cache. Web Gardening means that multiple worker processes serve content for the same application pool. Only the first process of a web garden will then benefit from blob caching which would mean that web gardening would cause negative impact on the overall performance.

 

2) Blob caching cannot be used with host named site collections

The blob caching engine uses the server relative path to decide if an item in the cache belongs to a URL or not. With host named site collections an additional criteria come into play: the "host" http header. The blob cache engine on the other hand is not aware about host named site collections. That means if you have two site collections with items that have the same server relative URL (e.g. items in the style library) but are different the item that was first hit gets cached and served for all other host named site collections as well.

 

3) A cached item is only available in one frontend server

The blob cache is a per server cache. That means if an item has been cached on server 1 and the next request for the same item hits server 2 then the item has to downloaded again to the second frontend server. That means the load on a SQL backend server can be higher in the startup phase if multiple frontend servers exist as the same item might have to be downloaded multiple times to the different frontend servers.

 

原文地址:

MOSS 2007 Blob caching and it's limitations

http://blogs.technet.com/stefan_gossner/archive/2009/05/02/moss-2007-blob-caching-and-it-s-limitations.aspx

 

更多信息关于blog cache:

Recommendations for SharePoint Application Pool Settings

http://blogs.msdn.com/joelo/archive/2007/10/29/sharepoint-app-pool-settings.aspx

 

How to automatically reset/clear the Blob Cache/Disk Cache (programmatically)

http://blogs.msdn.com/nehajain/archive/2009/05/25/how-to-automatically-reset-clear-the-blob-cache-disk-cache-programmatically.aspx

 

另外:

http://support.microsoft.com/kb/973400/ 中fix了一个blob cache进程访问冲突的问题.

 

01/08/2010 更新

=============

关于Blob的文章

http://sharepointinterface.com/2009/10/30/manually-clearing-the-moss-2007-blob-cache/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值