1

I have enabled SharePoint Blob Cache by modifying BlobCache Element in web.config of my Web Application.

In this scenario, all the default SharePoint files (OOB JS and CSS files) come with an appropriate Cache-Control header.

However, the files uploaded in a document library still have Cache-Control: Private, max-age=0.

Is there any step that I am missing?

FYI: I tried flushing the BLOB cache, resetting IIS, clearing browser cache, but these steps did not work for me.

1

This blog post explains in a verbose, but clear, fashion about how to appropriately configure blob caching for SharePoint. For example:

Failure to specify a max-age attribute in the BlobCache element of the web.config will result in the default value of 86,400 seconds (24 hours) being used. Use of a non-zero max-age attribute will result in the attachment of client-side cacheability headers to assets that are being BLOB cached, and such headers can result in BLOB assets being cached on the client beyond the duration of the current user session; such caching can easily result in "stale" BLOB resources being used from the client rather than newer ones being fetched from the WFE, so adjust max-age values carefully.

Caching in SharePoint is a powerful performance booster, but must be configured with explicit thought and design - so I recommend reading that article in detail.

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.