Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Using SharePoint Foundation 2010 and would like to enable output caching for certain pages for performance reasons. On SharePoint Server you can enable page output caching (it is actually ASP.NET output cache under the hood). Of course on SPF you don't get that.

So how can I enable output caching in SPF2010? In ASP.NET I would just add a page directive - something like <%@ OutputCache Duration="30" %>. SharePoint throws an error if this is in the page. Sounds like it needs to be done in code, perhaps override the page class? Any suggestions welcome.

share|improve this question

1 Answer 1

SharePoint Foundation does not support output caching. You have to rely on IIS configuration or use the ASP.NET Cache objects in your code.

share|improve this answer
    
IIS caching works by file extension, so not so easy to choose which pages to cache. If some pages have forms or postback behaviour it is probably not an option. –  Anonymous Jun 22 '10 at 13:27
    
Agreed. SP by default enables caching on some of the virtual directories containing static files. –  Wictor Wilen MCA MCM MVP Jun 22 '10 at 14:32

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.