Caching Design Issue

Discussion in 'ASP .Net' started by RMD, Jun 24, 2003.

  1. RMD

    RMD Guest

    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
    RMD, Jun 24, 2003
    #1
    1. Advertising

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

    Justin Dutoit

    "RMD" <> wrote in message
    news:...
    > 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
    >
    >
    Justin Dutoit, Jun 25, 2003
    #2
    1. Advertising

  3. RMD

    RMD Guest

    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

    "Justin Dutoit" <> wrote in message
    news:...
    > What about a parameter called Clear? Set it to 1, then you can varybyparam
    > ...
    >
    > Justin Dutoit
    >
    > "RMD" <> wrote in message
    > news:...
    > > 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
    > >
    > >

    >
    >
    RMD, Jun 25, 2003
    #3
  4. Maybe you could make a token change to some data the user control depends
    on.

    hth
    Justin

    "RMD" <> wrote in message
    news:...
    > 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
    >
    > "Justin Dutoit" <> wrote in message
    > news:...
    > > What about a parameter called Clear? Set it to 1, then you can

    varybyparam
    > > ...
    > >
    > > Justin Dutoit
    > >
    > > "RMD" <> wrote in message
    > > news:...
    > > > 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
    > > >
    > > >

    > >
    > >

    >
    >
    Justin Dutoit, Jun 26, 2003
    #4
  5. RMD

    mai86

    Joined:
    Oct 8, 2008
    Messages:
    2
    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.
    mai86, Oct 8, 2008
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Hypo
    Replies:
    6
    Views:
    392
  2. Troy Simpson

    Fragment Caching inside page caching?

    Troy Simpson, Jan 19, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    768
    Troy Simpson
    Jan 19, 2004
  3. Chu
    Replies:
    1
    Views:
    355
  4. Timasmith

    caching design patterns

    Timasmith, Nov 11, 2006, in forum: Java
    Replies:
    8
    Views:
    413
    Chris Uppal
    Nov 14, 2006
  5. JimLad
    Replies:
    3
    Views:
    900
    JimLad
    Jan 21, 2010
Loading...

Share This Page