Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cache and User of Server memory
Message
 
À
22/12/2004 12:48:35
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Versions des environnements
Environment:
C# 1.1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
00971502
Message ID:
00971622
Vues:
18
Gordon,

The ASP.NET cache holds the actual data and is global to the machine. Which means there's only one copy in the cache no matter how many users.

When your page uses an object out of the cache it gets deserialized into the local AppDomain, so there's a memory hit there.

Your real hit is the actual simultaneous requests that are happening which is probably relatively small at any given request instance.

Still remember that the DataSet is serialized in the Cache object so using the Cache for objects especially large one's isn't free.

+++ Rick ---




>I have created a business object which pulls static tables from the server using a single stored procedure.
>
>For example, one business object created, one stored procedure executed on the data server, and finally a single dataset within the application containing 14 tables. These tables are things like Gender, Marital Status, Province/State, Country...
>
>The estimated total size of the 14 tables is 35k.
>
>The first time the application runs, the 14 tables are loaded into the cache on the server.
>
>
>mmDataSet ds = (mmDataSet)Cache["cacheSupportTables"];
>if (ds==null)
>{
>	// pull data from the server and store it to the cache
>	Cache["cacheSupportTables"] = (mmDataSet)this.oSupportTables.LoadAllTables();
>	this.testmessages.Text = "Pulled from data server.";
>}
>else
>{
>	// Send the cache to the BusinessObject
>	this.oSupportTables.GetAll(ds);
>	this.testmessages.Text = "Pulled from cache.";
>}
>
>
>
>Now here is the question. If there are 1,000 users connected to the web application, how much server memory is used?
>
>a. 35k
>b. 35000k + 35k for the cache
>
>When I execute the ---
>
mmDataSet ds = (mmDataSet)Cache["cacheSupportTables"];
>---line do we create a copy or is it just a pointer to the data?
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform