To flush the BLOB cache from web application
- Open a SharePoint Management Shell or ISE
- 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.
- 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 }
Hi Venu,
This is been a awesome blog post and I liked it 🙂