Cache options for custom control

Discussion in 'ASP .Net Building Controls' started by Henke, Jan 17, 2006.

  1. Henke

    Henke Guest

    Hi,

    I want to develop a function which will display a menu system based on a
    hieracy which is fetched from a database.
    For performace reason I would like to cache the menu structure per-user for
    all pages the user will visit.
    The problem here is that I can not use the session object for caching
    because the control will be used on aspx pages in SharePoint and by default
    sessions is disabled for some reason (probably for loadbalacing reason).
    Wher developing controls for SharePoint you create "web parts" which has it
    owns cache function built-in. I can not use web parts for this task, because
    the menu will be displayed on all pages and without a "web part zone"

    I have read about caching for user controls and I´m not sure if that is a
    better way to move forward with this task.

    Any advice how to handle this issue?

    Regards,

    // Henk
     
    Henke, Jan 17, 2006
    #1
    1. Advertising

  2. Henke

    pH Guest

    Maybe the easiest way would be a Dictionary (map) object stored in the
    Application collection, or perhaps as a static member of the user
    control class, with the usernames as keys and your menu data as the
    value. Then you could retrieve the data relevant to whoever was
    accessing the page, without actually needing a Session object.

    This method is not particularly elegant, but it should work and would
    be quite easy to code.
     
    pH, Jan 18, 2006
    #2
    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. Alexandre Guimond

    creating custom options for custom widgets?

    Alexandre Guimond, Mar 22, 2006, in forum: Python
    Replies:
    0
    Views:
    385
    Alexandre Guimond
    Mar 22, 2006
  2. Cliff  Martin
    Replies:
    1
    Views:
    3,084
    Larry Smith
    Jan 31, 2007
  3. jacksu
    Replies:
    0
    Views:
    539
    jacksu
    Oct 9, 2007
  4. Utkado
    Replies:
    2
    Views:
    2,238
  5. Yaron Cohen
    Replies:
    0
    Views:
    350
    Yaron Cohen
    Nov 19, 2003
Loading...

Share This Page