R – How to cache ASP.NET user controls

asp.netcachinguser-controls

I heard on a recent podcast (Polymorphic) that it is possible to cache a user control as opposed to the entire page.

I think my header control which displays static content and my footer control could benefit from being cached.

How can I go about caching just those controls?

Best Answer

Take a look here
You can use VaryByParam and VaryByControl in the output cache.