locked
Page Caching by user control RRS feed

  • Question

  • User129694689 posted

     I am get confused with asp.net 2.0 page caching options.

    I have a page which is cached by 20 minutes, but with in the page, there is a user control which updates its content in every 5 minutes. I wonder, how frequent the user control will be updated. 20 minutes or 5 minutes.

    After every update of the user control, does this cause the page to be reloaded?
     

    Monday, March 3, 2008 3:10 PM

Answers

  • User1564875471 posted

    Reference of MSDN:

    If the page output cache duration is longer than the user control output cache duration, the page output cache duration takes precedence. For example, if page output caching is set to 100 seconds and the user control output caching is set to 50 seconds, the entire page, including the user control, is stored in the output cache for 100 seconds, regardless of the shorter setting for the user control.

     

    please read :

    Caching Portions of an ASP.NET Page 

    and look at 'Caching the Page and User Controls for Different Durations" Part. 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, March 3, 2008 3:30 PM

All replies

  • User1564875471 posted

    Reference of MSDN:

    If the page output cache duration is longer than the user control output cache duration, the page output cache duration takes precedence. For example, if page output caching is set to 100 seconds and the user control output caching is set to 50 seconds, the entire page, including the user control, is stored in the output cache for 100 seconds, regardless of the shorter setting for the user control.

     

    please read :

    Caching Portions of an ASP.NET Page 

    and look at 'Caching the Page and User Controls for Different Durations" Part. 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, March 3, 2008 3:30 PM
  • User129694689 posted

    Thanks for that.

    I just searched msdn for "Response.Cache" before posting, but nothing comes out. I try harder next time.
     

    Monday, March 3, 2008 9:44 PM