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 / Caching / November 2003

Tip: Looking for answers? Try searching our database.

What happens here?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jimmy [Used-Disks] - 10 Nov 2003 14:59 GMT
Take a common example of using the cache:

DataSet MyData = Cache["MyData"];
if(MyData == null){
 MyData = new MyDataSet();
 SomeAdapter.Fill(MyData); // Lengthy operation
 Cache["MyData"] = MyData;
}
// Do something with MyData

Now imagine this code executing simultaneously in two separate threads of
the same application. In both instances, the value in the Cache is null.
What goes where? Do two datasets get created/filled, but only one stored? Or
do two get stored - one in each separate context?

In other words, is there a possibility for multiple independant copies of
the Cache being created, or is the Cache truly global?

Signature

-Jimmy

"Mike Moore [MSFT]" - 10 Nov 2003 22:52 GMT
Hi Jimmy,

The cache is truly global. In your scenario, you will only get one database
in your cache.

Thank you, Mike
Microsoft, ASP.NET Support Professional

Microsoft  highly recommends to all of our customers that they visit the
http://www.microsoft.com/protect site and perform the three straightforward
steps listed to improve your computer?s security.

This posting is provided "AS IS", with no warranties, and confers no rights.

--------------------
> From: "Jimmy [Used-Disks]" <noemail@used-disks.com>
> Subject: What happens here?
[quoted text clipped - 7 lines]
> Newsgroups: microsoft.public.dotnet.framework.aspnet.caching
> NNTP-Posting-Host: ip66-107-65-98.z65-107-66.customer.algx.net
66.107.65.98
> Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP12.phx.gbl
> Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.aspnet.caching:1776
> X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.caching
>
[quoted text clipped - 15 lines]
> In other words, is there a possibility for multiple independant copies of
> the Cache being created, or is the Cache truly global?
Jimmy [Used-Disks] - 11 Nov 2003 14:11 GMT
> Hi Jimmy,
>
> The cache is truly global. In your scenario, you will only get one database
> in your cache.

Thanks, that's good to know. Is there any documentation on this? I have
found nothing which states this specifically.

> Thank you, Mike
> Microsoft, ASP.NET Support Professional

Signature

-Jimmy

Jimmy [Used-Disks] - 11 Nov 2003 17:45 GMT
> Thanks, that's good to know. Is there any documentation on this? I have
> found nothing which states this specifically.

Never mind. Jerry pointed it out to me.

Signature

-Jimmy


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.