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.