to cache or not to cache?

i have a toolbar at the top of all my web pages and I am not sure whether it is worth caching or not. this toolbar is in fact a search facility consisting of 4 dropdownlists. 3 of the DDL's are static and 1 is databound. i would like to make the whole toolbar into a user control and cache it.

Q1. If one of the DDL's selected item has changed the user control must know not to load from the cache. is it possible to include this kind of logic to a cached user control?
Q2. Is it worth caching my toolbar? Or should I just consider caching the 1 databound DDl instead?
any help much appreciated.

0
Wee
3/9/2004 9:44:27 PM
asp.net.web-forms 93655 articles. 5 followers. Follow

2 Replies
985 Views

Similar Articles

[PageSpeed] 31

Seems like you should be able to do this by using VaryByParam attribute of the OutputCache declaration.  So you might have VaryByParam="ddl1,ddl2,ddl3, etc".

The thing to consider is how many possible combinations of the DDL's could there be? In other words, how many different versions of the user control are you going to end up with in the cache? I recently came across a comparison of response times as the number of cached page versions increased. Using sample pages of 250 KB, with less than 1,000 pages cached, the responses/sec. was 15.37. With more than 1,200 cached pages, the responses/sec. dropped to 3.15.
Bryan.Daneman.org
0
bryanjd
3/9/2004 10:26:36 PM
ok i understand. my dropdownlists only contain about 4 or 5 items each so it might be worth me caching.

thanks for the advice.
cheers martin

0
Wee
3/10/2004 12:18:00 PM
Reply:

Similar Artilces:

Caching, Caching,Caching,Caching,Caching Why nobody know???
I have posted this problem quite a few times but never got a decent answer and I have still not found a solution. Every time I have a gridview when the page is refreshed the data in the gridview does not refresh. You might say well and GridView.DataBind() to the pageload method but I think there is a performance problem if you bind your gridviews every time. For example I have a dropdownlist, a gridview and button and the gridview is supposed to refresh depending on the value in the dropdown when the button is pushed. if you click on the button the gridview data does not change unless y...

Difference between System.Web.Caching.Cache and System.Web.HttpContext.Current.Cache
Hi,   Can any one help me to understand the difference between the web caching and teh  httpcontext caching. Which is best to use. Does any one have the some good links on this topic. Thanks in advance for all ur time. System.Web.Caching.Cache: this is the implementation of .NET caching.System.Web.HttpContext.Current.Cache: this is the instance of that implementation, that lives in the application domain.You should use System.Web.HttpContext.Current.Cache for storing your data.More info:How to: Add Items to the Cache:http://msdn.microsoft.com/en-us/library/18c1wd61(VS.80)....

To cache or not to cache
It's a well known fact that it's a good practice to cache results of SQL queries. But here as everywhere we should limit ourselfs and not to cache everything, shouldn't we? ) For example, you know that in facebook you can enter information about yourself - first name, last name, all your schools, jobs and so on. This data changes very rarely. So, as books say this data is perfect to be cached. But, you see, there can be millions of users with there profiles in our cache. So.. to cache or not to cache? )  it is a good practice to use limited size content and low edit freque...

To Cache or Not To Cache?
Hello, I'd like the opinion of the community on this question. We've just completed a migration from Exchange 5.5 to GroupWise 7. Migration went well. Right now, everyone is using WebAccess but I am rolling out the GroupWise Windows client (with latest FTFs) along with an updated XP SP2 workstation image shortly, to the office people. They had been using Outlook with Exchange, no caching. We have 6 locations with office people. About 25 are local to the PO server. The other locations, ranging from 25 to 8 per location are connected to the PO server via a T-1 WAN lin...

To cache or not to cache ?
I am really confused here. What I have are two forms one is where I get metadata for a document and next page where the user uploads the file for that document. What I want is a link from upload page back to the metadata page with the fields still filled in (cached maybe ?) and a link that takes back to that page without cache...In other words..I want two links on upload page one that take users back to the metadata page with fields filled in from previous request and the other link which takes to metadata form with empty fields. I am not sure how to accomplish this. I tried using ca...

System.Web.Caching.Cache
HiWe had a debate here at our office what happens if you add an item to the cache _without_ telling anything about expiration times.If you type...cache("foo")=myobj...will myobj be placed in the cache...1. Forever (if the GC doesn't collect it because of high memory use)2. Some unknown (to us) default expiration timeThanks in advanceR If you don't provide any dependencies or expiration time then the object remains in the cache for the duration of the AppDomain being up.  However, as always, there is a wrinkle.  If the worker process starts getting low on memory, then objects...

confuse with System.Web.Caching.Cache
hi, i know that System.Web.Caching.Cache is shared by all sessions. i don't undertand how asp.net makes it so (Cache is shared by all all sessions) In .net sdk docuement i see that "Only one instance of Cache is created in one Application Domain". But Reflector shows that the Cache class does not use the singletonn design pattern. Thank you for your help.What really matters most is the chance to communicate with you, my friends, rather than marking my post as answer, though I would be really appreciated if you do so. No one has an idea? What really...

.Net Caching Ughhhh (Micro-caching)
I'm designing an application where data is continuous and becomes dirty in a matter of seconds. The load is also high and therefore, to avoid straining the database server, i cache all data for a couple of seconds. That's fine. However, some data are HIGHLY VOLATILE and requires the most latest data...for these types of data, I use 1 second caching. I done benchmarks of 1-6 second caching and the benefits on a high load server is enormous. However there is a problem with this micro caching technique.....the problem is...some of the objects get destroyed as soon as it is pulled out. ...

System.Web.Caching.Cache Error
Hello all,I  am using the below code in one of my pages:======================================================if (Cache["DateList"] == null){    System.Data.IDataReader DateReader = Data.Dates();    while (DateReader.Read())    {        DateList[DateReader["Date"]] = DateReader["Date"];     }    DateReader.Close();    Cache.Insert("DateList", DateList, null, DateTime.Now.AddMinutes(1), Cache.NoSlidingExpiration);}===================================================...

How to disable the system.web.caching.cache
Hi Guys, Im currently using some cms tool for my web application. All the page content stores in sql database. This cms tool is using system.web.caching.cache to store the page content in cache to improve the performance. The problem im facing is the page always shown the old content as it refuse to get the new content for the page. I can get the new content by doing the following things:- changing the url to upper case- restart iis- change web.config Im using site.master page, cms tool uses this master page + the content from the database to rewrite the dynamic url on the fly.I tried ...

Web Form Caching
I have a main window called Main.aspx that contains static data such as menu selections that don't normally change.  The window is launched with a browser toolbar.  From this window I can launch other web forms, using JavaScript, in a new window named "LaunchedFromMainWindow" which is launched without a toolbar - the main intent here is to not allow the back button on the browser since the launched form contains editable data.  Each time I select another menu selection from Main.aspx I do a Session.RemoveAll() in the Page_Load since I'm using sessions on other forms ...

Why is my web form caching?
I have an aspx page that I open with a ShowModalDialog call from javascript.  The first time I open the form the information on it is correct; however, every subsequent time I open it during the same session, the original version of the form opens, when the data should be different.  If I close the browser and open it again, which gives me a new session, the same thing starts over again.  The first view is correct, and each subsequent view just brings up the original version.  I am not aware of any kind of caching configured for my web site, and as far as I can tell, thi...

Caching with System.Web.HttpContext.Current.Cache
Hi, I have a 3 tier app. I populate a drop down list in my presentation layer using a datareader. The drop down is bound to the following code in the data layer.public static SqlDataReader GetAuthors() {SqlConnection connGetAppNo = null; try {connGetAuth = ConnectionProvider.GetConnection();  if (connGetAuth != null) { SqlDataReader drGetAuth = (SqlDataReader)System.Web.HttpContext.Current.Cache["GetAuth"];if (drGetAuth == null) { SqlCommand cmdGetAuth = new SqlCommand("GetAuth", connGetAuth);cmdGetAuth.CommandType = CommandType.StoredProcedure; drGetA...

How can I clear the System.Web.Caching.Cache ?
Hello, How can I remove all items of my System.Web.Caching.Cache ? I'm think about using a loop to remove each item, but an important consideration is that my cache component, is receiving others request all the time. May be that these requests will be executed simultaneously with my new cache cleaner. Any idea ? Thanks !! If you are controlling access to the cache through your component then you can code to control what happens if someone accesses it during a loop to remove all objects from the cache. A loop to remove each item shouldn't normally be that lengthy an ...

Web resources about - to cache or not to cache? - asp.net.web-forms

Grande Cache - Wikipedia, the free encyclopedia
... 119.12250°W  / 53.87472; -119.12250 Coordinates : 53°52′29″N 119°07′21″W  /  53.87472°N 119.12250°W  / 53.87472; -119.12250 Grande Cache ...

Monitoring cache with Claspin - Facebook
Facebook Engineering hat eine Notiz mit dem Titel Monitoring cache with Claspin geschrieben. Du kannst den vollständigen Text hier lesen.

Caché (@CacheStyle) on Twitter
Log in Sign up You are on Twitter Mobile because you are using an old version of Internet Explorer. Learn more here Caché @ CacheStyle Official ...

Digitas Cache for iPad on the iTunes App Store
Get Digitas Cache on the App Store. See screenshots and ratings, and read customer reviews.

Pizza Hut from W Lawton Cache Location - Flickr - Photo Sharing!
Easily one of the worst deliveries I've ever seen... On top of the mess of a delivery, the pizza itself was undercooked.

Turning Caches into Distributed Systems with mcrouter - Data@Scale - YouTube
Ryan McElroy, software engineer at Facebook, introduces "mcrouter," software that the company has developed for turning standalone caches into ...

Rocket launchers, grenades among cache of weapons found in Gippsland
Rocket launchers and hand grenades reportedly among 140 weapons found by police at a property in Gippsland.

Gun licence revoked after police find massive cache of weapons on Sunshine Coast
A Sunshine Coast man who had a cache of unregistered weapons will not get his gun licence back, after a tribunal ruled his "Christian values" ...

More on Apple’s A9X SoC: 147mm2@TSMC, 12 GPU Cores, No L3 Cache
... 1GB LPDDR2 Memory Bus Width 128-bit 64-bit 128-bit 128-bit Memory Bandwidth 51.2GB/sec 25.6GB/sec 25.6GB/sec 17.1GB/sec L2 Cache ...

How to clear app data and cache in Android 6.0 Marshmallow
Have you updated to Android 6.0 Marshmallow and have been left wondering how to clear app data and clear app cache? We've got you covered!

Resources last updated: 1/16/2016 3:18:54 PM