Shared the Cache object accross IIS Applications

C

cmay

Is there any way that 2 IIS Applications:

localhost/App1
localhost/App2

can share a Cache?

Lets say that both applications need to use the same objects
frequently, and both are storing them in Cache. Is there a way to
avoid duplicating this? Putting everything in 1 cache?
 
B

Bruce Barker

no, because they are in seperate app domains. you could write a cache
hosting service, that they all call, but then you would be doing out of
process marshaling (even cross domain marshaling is slow).

-- bruce (sqlwork.com)
 
J

john_teague

I've never tried this, so I don't know if it will work. You could
serialize your objects to a file and create a dependency on the file.
use the same file in both apps. I would create a Helper class used by
both applications and be sure and lock the object when reading and
writing so you don't have any race conditions.
This article might help.
http://msdn.microsoft.com/msdnmag/issues/04/07/CuttingEdge/

A little more searching and I found this article, which describes
exactly what I'm talking about.
http://www.eggheadcafe.com/articles/20030420.asp

Good Luck
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top