How to cache ASP.NET user controls?

In a recent podcast (Polymorphic), I heard that you can cache a user control, not the entire page.

I think my header control, which displays static content and my footer, can benefit from caching.

How can I cache only those controls?

+3
source share
2 answers

Look here.
You can use VaryByParamit VaryByControlin the output cache.

+4
source

I think you can specify OutputCache in the control markup file, as on an ASPX page. And it will be automatically cached automatically.

OutputCache MSDN , , .

, ASP.NET, , .

+1

Source: https://habr.com/ru/post/1696688/


All Articles