本文介绍了WCF缓存解决方案 - 需要咨询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我工作的公司正在实施的缓存解决方案。我们有几个WCF Web服务托管,我们需要缓存,可以持续进账,无论客户端的会话来服务特定的值。我在看下面的技术:

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:

  • 缓存应用程序块4.1

  • Caching Application Block 4.1

使用的httpRuntime缓存WCF TCP服务

WCF TCP Service using HttpRuntime Caching

Memcached的Win32和客户端

Memcached Win32 and Client

微软AppFabric缓存测试版2

Microsoft AppFabric Caching Beta 2

我们的测试服务器是Windows Server 2003与IIS6,但我们的生产服务器是Windows Server 2008中,所以任何上述选项将工作(除AppFabric缓存我们的测试服务器上)。

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.

在此先感谢。

推荐答案

我们正在使用我们的应用程序内置的httpRuntime缓存,它工作得很好。

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

这是很容易到位,因为没有什么可安装在服务器上。此外,移动到AppFabric缓存不应该是这样一个大问题以后。

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.

这就是说,它也带有一定的局限性,特别是如果你的服务相同的IIS应用程序中没有被托管的缓存对象将被复制为他们每个人。如果你不打算缓存多少数据和/或如果你不打算对它们进行缓存很长一段时间,你应该罚款,你就不会结束消耗太多的内存。

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.

您似乎不具有负载平衡的服务器,但是在这种情况下,使用的httpRuntime缓存也意味着复制每个服务器上的高速缓存。这是什么样的东西,你可以prevent使用memcached的或AppFabric缓存...

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...

这篇关于WCF缓存解决方案 - 需要咨询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-18 22:22