BLOB
Cache in SharePoint:
A BLOB cache is a disk-based cache that stores binary large objects (BLOBs) such as frequently used image, audio, and video files, and other files that are used to display web pages.
Each front-end web server maintains its own BLOB cache. When you enable a BLOB cache, you specify the file types to include in the cache and also the location of the BLOB cache.
The first time that a BLOB file is requested, the file is copied from the database to the BLOB cache on the front-end web server. Future requests to the front-end web server for that same file are then served from the file that is stored in the BLOB cache, instead of being served from the database.
A BLOB cache is a disk-based cache that stores binary large objects (BLOBs) such as frequently used image, audio, and video files, and other files that are used to display web pages.
Each front-end web server maintains its own BLOB cache. When you enable a BLOB cache, you specify the file types to include in the cache and also the location of the BLOB cache.
The first time that a BLOB file is requested, the file is copied from the database to the BLOB cache on the front-end web server. Future requests to the front-end web server for that same file are then served from the file that is stored in the BLOB cache, instead of being served from the database.
This reduces the network traffic and the load on the database
server.
Configure
BLOB cache settings:
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.
Steps:
1. Open IIS by goto run type "inetmgr" select the web site that you want to configure BLOB cache.
1. Open IIS by goto run type "inetmgr" select the web site that you want to configure BLOB cache.
2. Right click select "Explore" then open the
web.config file with
notepad (Before making any changes to web.config file please make a copy)
3. find the following line: <BlobCache location="C:\BLOB\14" path="\.(gif|jpg|jpeg|jpe|jfif|bmp|dib|tif|tiff|themedbmp|themedcss|themedgif|themedjpg|themedpng|ico|png|wdp|hdp|css|js|asf|avi|flv|m4v|mov|mp3|mp4|mpeg|mpg|rm|rmvb|wma|wmv|ogg|ogv|oga|webm|xap)$" maxSize="10" enabled="false" />
3. find the following line: <BlobCache location="C:\BLOB\14" path="\.(gif|jpg|jpeg|jpe|jfif|bmp|dib|tif|tiff|themedbmp|themedcss|themedgif|themedjpg|themedpng|ico|png|wdp|hdp|css|js|asf|avi|flv|m4v|mov|mp3|mp4|mpeg|mpg|rm|rmvb|wma|wmv|ogg|ogv|oga|webm|xap)$" maxSize="10" enabled="false" />
4. In this line, change the location attribute to specify a directory that has enough space to accommodate the cache size.
5. 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.
6. 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.
7. To enable the BLOB cache, change the enabled attribute, from "false" to "true" and save the notepad.
--------------------------------------------------------------------------------------------------------------------------------
Flush
the BLOB cache:
====================
When you flush the BLOB cache, you clear the contents of the BLOB cache for a web application. This is useful if the BLOB cache becomes out of sync with the content.
(Note: You cannot use the user interface to flush the BLOB cache. Instead, you use Windows PowerShell and the SharePoint object model to complete this task.)
====================
When you flush the BLOB cache, you clear the contents of the BLOB cache for a web application. This is useful if the BLOB cache becomes out of sync with the content.
(Note: You cannot use the user interface to flush the BLOB cache. Instead, you use Windows PowerShell and the SharePoint object model to complete this task.)
1. Verify that you have the following memberships:
- securityadmin fixed server role on the SQL Server instance.
- db_owner fixed database role on all databases that are to be updated.
- Administrators group on the server on which you are running Windows PowerShell cmdlets.
2.Copy the following code and paste it into a text editor, such as Notepad.
$webApp = Get-SPWebApplication "<WebApplicationURL>"
[Microsoft.SharePoint.Publishing.PublishingCache]::FlushBlobCache($webApp)
Write-Host "Flushed the BLOB cache for:" $webApp
(Replace <WebApplicationURL> with the URL of the web application whose BLOB cache you want to clear)
- securityadmin fixed server role on the SQL Server instance.
- db_owner fixed database role on all databases that are to be updated.
- Administrators group on the server on which you are running Windows PowerShell cmdlets.
2.Copy the following code and paste it into a text editor, such as Notepad.
$webApp = Get-SPWebApplication "<WebApplicationURL>"
[Microsoft.SharePoint.Publishing.PublishingCache]::FlushBlobCache($webApp)
Write-Host "Flushed the BLOB cache for:" $webApp
(Replace <WebApplicationURL> with the URL of the web application whose BLOB cache you want to clear)
3.Save the file, and name it FlushBLOBCache.ps1 and then run.
For more information about SharePoint visit page MySharepoint



No comments:
Post a Comment