I have a SharePoint 2007 Publishing Site. The top level site is purely anonymous and one of the children is using Forms authentication using Custom membership provider. The Admin site is using windows authentication.

How can I set the site output caching to allow best performance without risking having authenticated users see each others data (cached)?

1 Answer 1


You should set the Anonymous Cache Profile for Site Collection to Public Internet. Remember to enable output caching and set output cache policy to allow override of publishing pages and page layouts (this will allow you to specify specific cache profiles later for specific page layouts and sub-sites).

To work around the 304 issue (picture and document libraries does not set correct max-age in header, and hence causes unnecessary roundtrips to the server asking for a picture that server already knows should be cached) you should also configure blob cache in web.config for anonymous site. Read more here, and a more techincal article by Stefab Gossner here.

Setting the authenticated profile could either be the out-of-the-box Extranet profile or a custom profile. Since the default extranet profile is varying by browser, this isnt very usable, so you need to create a custom profile under Site Collection Cache Profiles where you choose ACL check (will secure that cached content is security trimmed) and Vary By User Rights. If changes shouldnt be immediate, you should set a fixed duration to cache page, and not set check for changes option, this will give the best performance. If changes should be immediate check the check for changes option.

Another option for more advanced issues, is to create a vary by custom profile and code your own handler in C#: How to use MOSS output caching with custom parameters

Finally you should configure object cache (disk based cache). But keep ind mind that this could also cause personalized objects (such as welcome menu) to be cached. Read more on object cache here.

hth Anders Rask

Relevant links on caching in SharePoint How can I make my web site faster with caching ? Caching in Office SharePoint Server 2007

Your Answer

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

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