We have a few different environments for dev/test/uat and prod, in the prod environment we have an issue with cached files that never get updated. I have compared the site collection settings for cache between the environments and they are all the same. I have compared the web app settings in web.config and they are the same.

In prod, if I delete a file in a library, empty recycle bin, IIS reset, clear browser cache and all I can still browse to it by pasting the URL, but if I go to the library it is gone (and this even after a few weeks).If I add new files it's fine but if I update a style sheet in the style library and download it (send to ->download a copy) I can see the changes but if I click on it to open it in the browser then it's still the old one.

We're using blob cache storage, could this cause an issue like this? I have never really experienced anything like this before.

Any ideas where to start looking?

Edit: I have tried with adding a random query string after images etc. but still get the old version.

1 Answer 1


Blob cache refreshes on a timed basis only and causes what you are seeing.

However you can clear it via powershell and I think central admin, but here is the powershell:

$webApp = Get-SPWebApplication "<WebApplicationURL>"

The setting for the time is here in the web config.

" path="\.(gif|jpg|png|css|js|swf|flv)$" maxSize="10" enabled="true" max-age="36000" />

  • ok thanks, lets presume a lot of files have been updated before I got into the picture but changes never reflected to users and then the files were forgotten, if I now flush the cache will all these updated files be served to the browser and potentially break a lot of stuff? If this is the only way then so be it, just need to be able to explain why to the users. Would this be the same as resetting the output cache index in site coll settings (but for all site collections for the web app)?
    – John
    Dec 3, 2013 at 10:12
  • Yes if they have done updates but it hasn't pushed through, the default is 24 hours so unless you have changed this setting it should be fine to reset the cache. The blob cache is a publishing feature that has multiple levels like site collection which it caches. First I would check your setting and check the update. You could always disable caching for JS and CSS only, reset the cache once and IIS (Out of hours of course) and you won't suffer this issue again and images will remain cached. Once dev has stopped reenable JS and CSS.
    – Hugh Wood
    Dec 3, 2013 at 10:24
  • ok thanks, I can see in firefox that default max-age is used (24 hours) some files were updated months ago so it is clearly not working as expected.
    – John
    Dec 3, 2013 at 10:41
  • No this is blob cache, I would perform a manual flush in a maintenance cycle every now and then, perhaps a warm up script after. Say if its not used at weekends that is a good time.
    – Hugh Wood
    Dec 3, 2013 at 10:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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