tags:

views:

210

answers:

2

The company I work for is looking to implement a caching solution. We have several WCF Web Services hosted and we need to cache certain values that can be persisted and fetched regardless of a client's session to a service. I am looking at the following technologies:

  • Caching Application Block 4.1

  • WCF TCP Service using HttpRuntime Caching

  • Memcached Win32 and Client

  • Microsoft AppFabric Caching Beta 2

Our test server is a Windows Server 2003 with IIS6, but our production server is Windows Server 2008, so any of the above options would work (except for AppFabric Caching on our test server).

Does anyone have any experience with any of these? This caching solution will not be used to store a lot of data, but it will need to be fetched from frequently and fast.

Thanks in advance.

A: 

If you don't have special requirement for cache policy, you can create RESTful interface use "GET" method for services that need the cache then let the browser handle the cache.

Codism
The caching solution won't be used for results. It will be used to store things like user session information and index states.
Brandon
+1  A: 

We are using the built-in HttpRuntime Caching in our application, and it works very well.

It is very easy to put in place, as there is nothing to install on your servers. Moreover, moving to AppFabric Caching should not be such a big deal later on.

That said, it also comes with some limitations especially if your services are not hosted inside the same IIS application as the cached objects will be duplicated for each of them. If you don't plan to cache much data and/or if you don't plan to cache them for a long time, you should be fine as you won't end up consuming too much RAM.

You don't appear to have load-balanced servers, but in such a scenario, using the HttpRuntime caching also means duplicating the cache on each server. This is the kind of things that you can prevent with memcached or the AppFabric Caching...

Julien Jacobs
Thanks Julien. We are using HttpRuntime Caching as a solution until AppFabric Caching comes out of beta. AppFabric will probably be our ultimate solution as it will provide us with a caching solution when we move to a load-balancing solution for our servers down the road.
Brandon