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

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

<p>How can I go about caching just those controls?</p>

[{'answer_id': 44770, 'author': 'Mike', 'author_id': 4523, 'author_profile': 'https://Stackoverflow.com/users/4523', 'pm_score': 3, 'selected': True, 'text': '<p>Take a look <a href="https://web.archive.org/web/20081207012138/http://asp.dotnetheaven.com/aspnet/doc/caching/fragment.aspx" rel="nofollow noreferrer">here</a><br>\nYou can use <code>VaryByParam</code> and <code>VaryByControl</code> in the output cache.</p>\n'}, {'answer_id': 44776, 'author': 'chakrit', 'author_id': 3055, 'author_profile': 'https://Stackoverflow.com/users/3055', 'pm_score': 1, 'selected': False, 'text': "<p>I think you can specify OutputCache in the control's markup file like you'd do on an ASPX page. And it'd get properly cached automatically.</p>\n\n<p>Just read up on OutputCache page directive on MSDN and get the parameters right and it should do what you want it to.</p>\n\n<p>It's been a long time since I write classic ASP.NET but I believe that's how it's done.</p>\n"}]
['https://Stackoverflow.com/questions/44757', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/648/']