Caching Design Issue

R

RMD

I am creating a portal that uses UserControls as each "portlet". Each of
these UserControls is autonomous in the sense that whether or not they are
loaded is determined completely at runtime, and they are independent
mini-applications. So far, so good.

Each of these UserControls has a title bar (just like in windows) that has a
nifty little menu. What I would like to do is have an item on this menu
called "Refresh" which forcefully clears the output cache for a particular
portlet.

I'm hoping that I can do something like capture the "Refresh" menu item
event and pass that information to the containing page, which then does
something like "somePortlet.Cache.Clear()".

I've investigated the various "VaryBy" mechanisms, and I'm not sure how I
can use these to accomplish what I want.

Thanks,
RMD
 
J

Justin Dutoit

What about a parameter called Clear? Set it to 1, then you can varybyparam
....

Justin Dutoit
 
R

RMD

Well that's the problem. First, I don't want to use query string variables
if I can avoid it. (I currently have a very pretty and bookmarkable URL
that's parsed by an HTTP Module.)

Second, querystring variables, as you know, are page-wide... but this is a
per-usercontrol cache. I don't want to clear the cache of all usercontrols,
just specific ones.

I guess I'm confused as to how varybyparam works with usercontrols versus
pages. Wouldn't I have to have a unique querystring variable for each
usercontrol to look at? How would I do this if I can't necessarily know what
controls I going to be on the page until runtime. I suppose I could mandate
GUIDs for VaryByParam, but that seems kinda hacky.

RMD
 
J

Justin Dutoit

Maybe you could make a token change to some data the user control depends
on.

hth
Justin
 
Joined
Oct 8, 2008
Messages
2
Reaction score
0
Write asp.net code in an html page

I have a web page designed in HTML and I want to use the buttons on this page to write my asp.net code. I triad to make this control "run at server "but it doesn't work it's not allowing me to write vb.net code to this control. Please give me some help.
 

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

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top