views:

632

answers:

6

What is the best approach to implement distributed caching with .NET?

Edit: I was looking for a general caching schema for internal and external applications

+2  A: 

You should take a look at memcached. It can run on as many nodes as you want/need. There are at least two .Net clients available: here and here.

Sean Carpenter
+1  A: 

What are you caching (and why)? How widely are you planning on distributing the cache? On a LAN, on a (private) WAN, over the whole interweb?

Unsliced
+2  A: 

In the near future it will be Velocity. This is essentially a .Net implementation similar to Tangosol/Oracle's Coherence.

John Channing
@John Channing: Have you tried Velocity yet? +1 http://stackoverflow.com/questions/551514/experiences-using-microsoft-distributed-cache-velocity
Kb
+2  A: 

There is also NCache as another tool in addition to Velocity and memcached ports. As for strategies you will need to think about what @Unsliced is talking about because the strategy is different from the tool.

Mark Harris
+4  A: 

We are huge fans of ScaleOut StateServer. In our tests, it was 4x faster than MemcacheDotNet and almost 2x faster than Enyim, with a lower memory footprint. It was well worth the money (the others are free).

Obviously, your mileage my vary, as every caching scenario is different, but I would definitely recommend kicking the tires on StateServer.

Portman
+1  A: 

maybe you should check Shared Cache (http://www.sharedcache.com || http://sharedcache.codeplex.com) - it fast, free and open source.

regards, roni