Flush BLOB cache in SharePoint


To flush the BLOB cache from web application

  1. Open a SharePoint Management Shell or ISE
  2. Copy the following code and paste it into a text editor, such as Notepad
  3. $webApp = Get-SPWebApplication "<WebApplicationURL>"
    [Microsoft.SharePoint.Publishing.PublishingCache]::FlushBlobCache($webApp)
    Write-Host "Flushed the BLOB cache for:" $webApp
    
  4. Replace <WebApplicationURL> with the URL of the Web application whose BLOB cache you want to clear.
  5. Save the file, and name it FlushBLOBCache.ps1.

 

To flush the BLOB cache from ALL web application

           $wa = get-spwebapplicaton
           foreach($wapp in $wa)
            {
            [Microsoft.SharePoint.Publishing.PublishingCache]::FlushBlobCache($wapp)
            Write-Host "Flushed the BLOB cache for:" $wapp
            }
Advertisement

One thought on “Flush BLOB cache in SharePoint

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s