Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Building Controls / January 2006

Tip: Looking for answers? Try searching our database.

Cache options for custom control

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Henke - 17 Jan 2006 22:46 GMT
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
pH - 18 Jan 2006 22:11 GMT
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.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.