Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cache and User of Server memory
Message
 
To
23/12/2004 01:18:37
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Environment versions
Environment:
C# 1.1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
00971502
Message ID:
00971696
Views:
23
>So the cache approach is better than if I was to create the datasets as users log on to the system because they would be making multiples of 35k; in this case.

Yes, but remember 35k per user per hit of memory that comes and goes. If you can cache data you always should as you save yourself a trip to the database.

I got curious after I wrote the previous message so now there's more info in my WebLog on how this actually works:

http://west-wind.com/weblog/posts/1214.aspx

+++ Rick ---

>
>
>
>>>What do you consider large? Would 35k be large?
>>
>>That depends on your situation actually, but 35k is not big.
>>
>>>When you refer to "deserialized into the local AppDomain", what does this mean exactly?
>>
>>I actually screwed up here. Internally the Cache uses a Hashtable to store the cached values - the cache is bound to a specific AppDomain.
>>
>>So there's actually no issue getting values out of the cache - you are talking to a live object instance not a deserialized version of it it looks like.
>>
>>I did a little more research trying to find out exactly how the cache works, but I couldn't find any precise info that talks about the implentation. I dug out Reflector and traced through some of the Cache implemenation and it looks like it's going to a Hashtable for items added directly (Page Cache do some more complex logic incluing passing on the chaching directly to IIS6 for example).
>>
>>However, it looks to me like you create the object and store it in the cache and you get a reference back. Since DataSet/DataTable are thread safe for read operations there shouldn't be any problems with this approach.
+++ 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?
Previous
Reply
Map
View

Click here to load this message in the networking platform