User Control Caching

J

jmahtani

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.
 
J

Jeremy Cowles

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top