How to Flush the BLOB Cache in SharePoint 2013 – PowerShell Script

Sathish Nadarajan
 
Solution Architect
October 27, 2015
 
Rate this article
 
Views
15177

In this article, let us see how to Flush the BLOB Cache in SharePoint 2013 using PowerShell.

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.

In Many scenarios, we may require to clear the BLOB Cache after our deployments. If we deploy any kind of major DLLs, definitely an IISRESET and the BLOB Cache Flush is required. Though it is not a mandatory step, always it will make sure that our new deployments are going in to the Server Properly.

 $webApp = Get-SPWebApplication "<WebApplicationURL>"
 [Microsoft.SharePoint.Publishing.PublishingCache]::FlushBlobCache($webApp)
 Write-Host "Flushed the BLOB cache for:" $webApp
 

A small piece of information will be handy during the time of deployment.

Happy Coding,

Sathish Nadarajan.

Author Info

Sathish Nadarajan
 
Solution Architect
 
Rate this article
 
Sathish is a Microsoft MVP for SharePoint (Office Servers and Services) having 15+ years of experience in Microsoft Technologies. He holds a Masters Degree in Computer Aided Design and Business ...read more
 

Leave a comment