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 / July 2005

Tip: Looking for answers? Try searching our database.

Cache.Remove() in a clustered environment

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Dale - 12 Jul 2005 20:06 GMT
In a clustered environment does Cache.Remove() kill all instances of the
cache item, or does it just kill the item from the box that the code is
currently executing on?

For example, suppose I have two boxes within a cluster. If a request gets
served up to Box 1, and Cache.Remove(foo) is executed, does foo get removed
from both Box 1 and Box 2, or just Box 1.
[MSFT] - 13 Jul 2005 03:06 GMT
Hello,

The Cache object is restricted to being used only within an application
running on a single machine.  Therefore, I think  Cache.Remove() only
remove cached objects on one server.

Luke
Alvin Bruney [MVP - ASP.NET] - 13 Jul 2005 14:53 GMT
that's correct

Signature

Regards,
Alvin Bruney - ASP.NET MVP

[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
Now available @ www.lulu.com/owc, Amazon.com etc

> Hello,
>
[quoted text clipped - 3 lines]
>
> Luke
TomislaW - 14 Jul 2005 16:18 GMT
so how to easy migrate asp.net project that uses cache and session objects
from single server to cluster servers?

> that's correct
>
[quoted text clipped - 5 lines]
>>
>> Luke
Alvin Bruney [MVP - ASP.NET] - 16 Jul 2005 13:54 GMT
Firstly, you are limited by the technology. If you need to share cache in a
cluster, it needs to be in the database or in a third party application that
makes this functionality available.

Signature

Regards,
Alvin Bruney - ASP.NET MVP

[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
Now available @ www.lulu.com/owc, Amazon.com etc

> so how to easy migrate asp.net project that uses cache and session objects
> from single server to cluster servers?
[quoted text clipped - 8 lines]
>>>
>>> Luke
Dale - 15 Jul 2005 19:16 GMT
Thank you very much for your response. This explains a lot.

Do you know where I could find some information, or possibly sample code,
that would clear the Cache for all servers in the cluster. The only way I can
think of is to actually run Cache.Remove() on each server. That would force
me to find a way to make a request to each server. It seems like there must
be a more elegant solution.

> Hello,
>
[quoted text clipped - 3 lines]
>
> Luke
Alvin Bruney [MVP - ASP.NET] - 16 Jul 2005 13:52 GMT
Yup, that's pretty much it. Or another cheesy way is to force an application
pool recycle. You can actually generate the recylce thru a script app that
runs on the servers. If you google, you should be able to find the app pool
recycle script.

Signature

Regards,
Alvin Bruney - ASP.NET MVP

[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
Now available @ www.lulu.com/owc, Amazon.com etc

> Thank you very much for your response. This explains a lot.
>
[quoted text clipped - 14 lines]
>>
>> Luke

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.