Friday, August 30, 2013

SharePoint 2010: Deactivate or enable BLOB Cache

The fastest way I think would be to edit the "web.config" file. Usually you can find that file under: "C:\inetpub\wwwroot\wss\VirtualDirectories\YOURPORT".
Click to enlarge
Open that file in Notepad and search for "blob". You will see this line:
Set the last parameter "enabled" to "false" to deactivate BLOB Cache. Set it on "true" to enable it.
Click to enlarge

Also you can change which files should be part of the BLOB cache simply by changing the filetypes in the "path" parameter.
Click to enlarge

I changed the "path" parameter after one of the CUs for SharePoint 2010 was throwing a lot of errors.

Wednesday, August 28, 2013

Flush the SharePoint 2010 blob cache

The blob cache is meant to save database access, because binary files (like images) will be stored on the webfrontend server. Sometimes you will run into problems like I did a couple of days ago.
So I had to flush my cache with this little script:

$webApp = Get-SPWebApplication 'WEBAPP'
[Microsoft.SharePoint.Publishing.PublishingCache]::FlushBlobCache($webApp)
An you're done. Pretty easy.