Uncategorized

SP 2013 Flush blob cache

I tried to update the site logo of the SharePoint portal by updating the CSS file but it still cached the old CSS file. I tried appending version number to the CSS file but still it showed the old image.

/styles library/core/custom.css?rev=1.0.0.0

I ran the following powershell script which ‘busted’ the JS and CSS cached file and updated with latest file.

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

For some reason the blob cache was out of sync with content database and this script helped me to update the cache. It seems restoring the content database will cause BLOB sync issue as mentioned in Technet article.

Useful references

https://technet.microsoft.com/en-us/library/gg277249.aspx

https://jonocairns.wordpress.com/2014/06/24/how-to-bust-cached-js-and-css-files-sharepoint-2013/

 

Advertisements

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s