2

I have 3 WFEs on my farm and want to ensure that when I flush the blob cache, that the cache is actually cleared.

I ran the PowerShell code below on one WFE and checked the BlobCache on the disk (C:\BlobCache) and it did not change in size or file count.

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

Questions
How do you flush the blob cache on all WFEs programatically?
How can you verify that the cache has actually been flushed?

2

The BLOB cache should be flushed on all servers running the Foundation Web service. When FlushBlobCache($webApp), the flush will not be immediate. As for how to tell, you can simply see if the property "blobcacheflushcount" is incremented by 1, or is a new property (if you haven't flushed the cache before) to confirm the Flush Command is queued. Just run:

$webApp.Properties["blobcacheflushcount"]

This won't tell you when it is complete. If you want to know that, you'll need to monitor the folder or ULS log one each server.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.