I have a large section of a page that I need cached. So I've got this
section in a user control and at the top of the user control I've
added -
<%@ OutputCache Duration="3600" VaryByParam="none" %>
<%@ Control Language="VB" AutoEventWireup="false"
CodeFile="filename.ascx.vb" Inherits="controls_filename" %>
There is no outputcache directive in the containing page. On
accessing
this page, it takes a significant amt of time to load. Accessing it
the 2nd time loads a bit faster but not significantly. When I moved
the outputcache directive out of the user control and to the
containing page, the loads are significantly faster. Any ideas on why
caching at the user control level is not working or is significantly
slower?
Thanks for any input.
Jeremy Cowles - 07 Dec 2007 18:22 GMT
What you posted was pretty vague. If I were you, I would:
1) Verify that output caching is working by putting a breakpoint in
the user control.
2) Profile the page to pinpoint what is causing the slow down
If caching is working, then it is a different control that is slowing
the page down.
Please post back here and let us know how it goes.
HTH,
Jeremy