Satyapriya Nayak
posted
2264 posts
since
Mar 24, 2010
from
|
|
Re: Data fragment caching in .NET
|
|
|
|
|
|
|
|
|
|
|
Hi Vineet,
Please refer the below link
http://www.dotnetfunda.com/articles/article1484-how-to-implement-fragment-caching-in-aspnet-.aspx
Thanks
|
|
|
|
|
|
Senthilkumar
posted
1057 posts
since
Jul 28, 2009
from
Bangalore
|
|
Re: Data fragment caching in .NET
|
|
|
|
|
|
|
|
|
|
Hi Vineet,
The same method will be used to do output caching and fragment caching. But the place where we need to do will be changed.
When you have the static page, if you want to increase the page performance then we have to use the output cache to the static pages. Then it will be cached based on the location we have given and it renders quickly.
But the same time, you may not want to cache the entire page and want to cache the portion in the web page then fragment comes into the picture.
Consider in a web page, you have dynamic content. But the some of the portions like Left menu, header menu, footer menu will be static. Then you have to create the web controls to these portions and assign the output cache to the web user controls.
<%@ OutputCache Duration="120" VaryByParam="None" %>
The above output cache directive has to be used in order to cache the fragment in asp.net. Please refer this link for more information.
http://msdn.microsoft.com/en-us/library/h30h475z(v=vs.71).aspx
|
|
|
|
|
If this post is useful then mark it as "Accepted Answer"
|
|
|
|
|
|