views:

60

answers:

2

I'm wondering what people's experiences are with in-memory cache solutions for .net.

We need an (ideally free) out-of-process caching solution that we can share between a number of different web sites (different app pools), and also some console apps that periodically run.

We've tried a few solutions so far, both of which are good but throwing up issues which make them less than ideal for production:

1) win32 Memcached with a .net client

Our first solution was to use a win32 port of memcached (http://jehiah.cz/projects/memcached-win32/), and a .net client library for it (http://sourceforge.net/projects/memcacheddotnet/).

It was fine and ran with no issues for a while, but then we started to see a lot of unexplained errors - the client library would fail to write to the cache. Not sure if this is an issue with the win32 port of memcached, or the client library, but I was uncomfortable with the lack of visibility of others using the same solution, and looked for a pure .net solution, which led me to...

2) SharedCache

Looks good, seems very well received in the community. Was very simple to set up and provides more features than our previous solution (e.g. the ability to get a list of all cached objects). This looked like a very good solution, but we recently started to see some issues creeping through:

  • Memory consumption, there is an issue where it isn't releasing memory well, the service was using 700M even though we only held 30M of cached data
  • Occasional CacheExceptions trying to retrieve objects from the cache (especially for larger cached objects)

So neither solutions are spot on. I'd love to know what solutions other people are employing. For information our server setup is currently only 32 bit windows box, so we don't have the option of a dedicated linux memcached server for example.

+1  A: 

Microsoft has the artist formerly known as Velocity, now comes with Windows Server AppFabric

Thanks, I'd heard of velocity before but not really tried it out. Looks like one to try..
Matt Roberts
A: 

So in the end although appfabric looked promising, it seemed too much for what we need, and very tricky to work with, so we stuck with sharedcache, the memory consumption is manageable for us..

I suppose most people on the enterprise are all over NCache..

Matt Roberts