Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Building Controls > Cache options for custom control

Thread Tools

Cache options for custom control

Posts: n/a

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 Im not sure if that is a
better way to move forward with this task.

Any advice how to handle this issue?


// Henk

Reply With Quote
Posts: n/a
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.

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Performance issue in multi-level Oracle Object/thin JDBC Options Options jacksu Java 0 10-09-2007 08:21 PM
good compile options for g++ options to enforce good coding Cliff Martin C++ 1 01-31-2007 02:03 AM
creating custom options for custom widgets? Alexandre Guimond Python 0 03-22-2006 05:55 PM
View source while using Cache-Control: no-cache in frames Yaron Cohen Javascript 0 11-19-2003 10:06 AM
ControlDesigner not invoked on custom control when control is rendered within another custom control Matt Sokol ASP .Net Building Controls 2 08-07-2003 07:13 AM