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.

SharePoint 2010: Deactivate or enable BLOB Cache

SharePoint 2010: Rename a SharePoint 2010 farm