The Artima Developer Community
Sponsored Link

.NET Buzz Forum
Warning: Page and Fragment Caching

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Michael Mello

Posts: 100
Nickname: knarf
Registered: May, 2004

Michael Mello is .NET Web Developer
Warning: Page and Fragment Caching Posted: May 5, 2004 4:24 PM
Reply to this message Reply

This post originated from an RSS feed registered with .NET Buzz by Michael Mello.
Original Post: Warning: Page and Fragment Caching
Feed Title: melloblog
Feed URL: http://www.thauvin.net/errorpage.htm?aspxerrorpath=/Default.aspx
Feed Description: .NET and Everything After.
Latest .NET Buzz Posts
Latest .NET Buzz Posts by Michael Mello
Latest Posts From melloblog

Advertisement
Caching in ASP.NET is a great feature that should be utilized when necessary.  Unfortunately it can cause a lot of headaches as well - something I learned early on, and I thought I would share.

Watch your cache at all times

Page output caching will override fragment caching if the value is greater than that of the user control.  For example, if you have a page that has output cache set for 150 seconds, and a user control (within the same page) that is set for 100 seconds; there will be some undesired results.  The user control will remain in the cache for the duration of the page, which in this case is 150 seconds, instead of the user control value of 100.  On the other hand, if the user control was set to cache every 150 seconds, and the page was set for 100, then your user control will remain cached, even when the page is regenerated. (Providing the desired results)  

I guess the lesson here is to watch your cache carefully, and be fully aware of when and how you implement ASP.NET caching features.

Check out Caching Portions of an ASP.NET Page for more information.

Read: Warning: Page and Fragment Caching

Topic: ASP.NET "VaryByCustom" page output caching Previous Topic   Next Topic Topic: New VS2005 focused MSDN TV episodes available...

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use