473,394 Members | 1,843 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Caching scenario suggestions

I have a navigation bar user control that is very expensive to create
from the database. This toolbar will only change when the user
navigates to a different section (there are three in total). What I
would like to do is cache the toolbar while the user is in a current
section, and only load it again when they change sections. Or , if I
could somehow cache all three on the initial page load and then
programatically load the desired one from the cache that would also
work. Any suggestions?

Also, the way the application is setup - the current section is not
stored in the querystring, rather the navigation controls discover the
section recursively from their parent pages.

Thanks

Jan 19 '06 #1
1 941
npverni,
The best "pattern" to use is to have a method that gets the data from the
database.
First, it will check the cache for DataSet, datatable, however you do it.
If the data is not present in Cache, then and only then will it make a
database call, and it will immediately cache the DataSet. Then it returns the
dataset.

You should not need to cache your actual controls, only the database action
result.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"np*****@gmail.com" wrote:
I have a navigation bar user control that is very expensive to create
from the database. This toolbar will only change when the user
navigates to a different section (there are three in total). What I
would like to do is cache the toolbar while the user is in a current
section, and only load it again when they change sections. Or , if I
could somehow cache all three on the initial page load and then
programatically load the desired one from the cache that would also
work. Any suggestions?

Also, the way the application is setup - the current section is not
stored in the querystring, rather the navigation controls discover the
section recursively from their parent pages.

Thanks

Jan 19 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: quique | last post by:
Hi I,m gonna explain my scenario problem: I've got an user control that i want to cache in diferent pages attending to the value of a parameter x, to make t possible i put the next directive in...
6
by: Suraj Joneja | last post by:
Hi All, I've an image control on my ASP.net page. This displays an image named 'Logo.jpg' in the location '~\Images'. Another application can change this image. It can select any image and...
3
by: Jack | last post by:
Is anyone able to get output caching to work on web services? I have followed KB 318299 which involves adding a method like the one below and calling twice within a short period of time. The...
5
by: Raj | last post by:
What is the purpose of file system caching while creating a tablespace? Memory on the test server gets used up pretty quickly after a user executes a complex query(database is already activated),...
3
by: Purti Malhotra | last post by:
Hi All, In our Web hosting environment we are using Virtual hosting i.e. multiple websites are on one server and multiple domains are pointing to a single website. Issue: We have two domains...
2
by: George1776 | last post by:
All, I've recently upgraded our production ASP.NET/C# application from framework 1.1 to 2.0. Since then I've been plagued by out-of-memory errors and problems with the cache object (which may...
14
by: rolfejr | last post by:
I am trying to display a PDF in the users browser that is pulled from a binary field in our database, and keep that PDF from caching on the client computer. I can successfully pull the PDF and...
0
by: escher4096 | last post by:
Hi There, I am attempting to figure out how to do inter-cache dependencies (cache item 1 depends on cache item 2, etc) with the Enterprise Library Caching block and am stumped. Does any one have...
12
by: =?Utf-8?B?RGF2ZQ==?= | last post by:
I'm using ASP.Net with an UpdatePanel. When the screen is exercised via a Web Test, the Web Test shows that the AJAX scripts are downloaded for every partial post back. My impression was that...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.