建议简单的.NET分布式缓存解决方案 [英] Suggestions for simple .NET distributed caching solution

查看:206
本文介绍了建议简单的.NET分布式缓存解决方案的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们必须运行Windows Server 2003为我们的生产Web服务器的一台服务器。我们的网站有不同的模块,并每次它自己的应用程序池中运行。这使得缓存有点问题,因为每个模块都有它自己的高速缓存很多时候多个模块缓存相同的项目。问题是,当在高速缓存中的项目在一个模块中被改变,另一个模块缓存相同的项目不能轻易被刷新。

We have one server running Windows Server 2003 for our production web server. Our web site has different modules to it and each is ran within it's own application pool. This makes caching a bit of a problem since each module has it's own cache and often times multiple modules cache the same items. The problem is when an item in the cache is altered in one module, another module caching the same item cannot easily be refreshed.

我们的网站是写在ASP.NET 4.0和我们缓存数据集,业务对象集合,列表等使用标准的HttpRuntime.Cache对象作为一个简单的键/值存储。我们不使用任何文件相关性,但我们确实使用时间到期。我们只有大约400用户同时所以我们没有做任何事情太疯狂了。

Our site is written in ASP.NET 4.0 and we cache datasets, business objects, collections, lists, etc. using the standard HttpRuntime.Cache object as a simple key/value store. We don't use any file dependencies but we do use a time expiration. We only have about 400 users at once so we aren't doing anything too crazy.

这听起来像是某种共享/分布式缓存将有助于解决这个问题,但我不知道使用哪一个,或者它会更好地推出我们自己,因为我们不需要很多在大部分可用的功能产品我见过。我见过使用WCF一些例子,但大多数都建议不要用自己的例子,生产,我知之甚少的WCF。

It sounds like some sort of shared/distributed cache would help resolve this issue but I am not sure which one to use or if it would be better to roll our own since we do not need a lot of the features available in most of the products I've seen. I've seen some examples using WCF but most have suggested not to use their examples in production and I know little about WCF.

我在找一些简单,快速,轻巧,安全生产运行,preferably免费的,如果可能的,但它并没有要。它需要在Windows Server 2003和放大器上运行;与ASP.NET 4.0。

I'm looking for something simple, fast, lightweight, safe to run in production, and preferably free if possible but it does not have to be. It needs to run on Windows Server 2003 & work with ASP.NET 4.0.

任何建议或信息?

推荐答案

memcached的用的 ASP.NET提供是一个受欢迎的选择。请记住,虽然这在.NET 4.0中推荐的方法做缓存使用新的<一个href=\"http://msdn.microsoft.com/en-us/library/system.runtime.caching.objectcache.aspx\">ObjectCache而不是 HttpRuntime.Cache 。有一个内置的内存实现到.NET框架(<一个href=\"http://msdn.microsoft.com/en-us/library/system.runtime.caching.memorycache.aspx\">MemoryCache)并且还可能检出memcached的的实现。

memcached along with an ASP.NET provider is a popular choice. Bear in mind though that in .NET 4.0 the recommended way to do caching is to use the new ObjectCache instead of HttpRuntime.Cache. There is a built in memory implementation into the .NET framework (MemoryCache) and also you may checkout an implementation for memcached.

这篇关于建议简单的.NET分布式缓存解决方案的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆