简体   繁体   English

ASP.NET数据缓存? Memcache相当于

[英]ASP.NET Data Caching? Memcache equivalent

Having used PHP on Linux a lot, I'm used to using memcache so that the database doesnt have to be accessed on every single request. 在Linux上使用PHP很多,我习惯使用memcache,因此不必在每个请求上访问数据库。 What do people use on Windows the achieve this? 人们在Windows上使用什么来实现这一目标? From the asp.net mvc applications which I've seen, none of them use any sort of cache, they just hit the database on every request? 从我见过的asp.net mvc应用程序中,它们都没有使用任何类型的缓存,它们只是在每次请求时都会访问数据库? Is this common, and if so, why is it acceptable? 这是常见的,如果是这样,为什么可以接受?

You can use memcached also. 你也可以使用memcached There are also other alternatives . 还有其他选择 You may also check Scott Gu's post about the new cache extensibility model introduced in ASP.NET 4.0. 您还可以查看Scott Gu关于ASP.NET 4.0中引入的新缓存可扩展性模型的帖子

There is a Memcache equivalent for ASP.NET, it is AppFabric (code name Velocity). 有一个与ASP.NET相同的Memcache,它是AppFabric(代号为Velocity)。 You can find out how to install and use it here , there are also detail instruction and whitepapers. 您可以在这里找到如何安装和使用它,还有详细说明和白皮书。

Very few professionally built mvc apps would 'hit the database on every request', mvc is still built on top of the asp.net infrastructure which has a robust and proven cacheing engine. 很少有专业构建的mvc应用程序会“在每次请求时都访问数据库”,mvc仍然建立在asp.net基础设施之上,该基础设施具有强大且经过验证的缓存引擎。

FYI: Microsoft's memcache equivalent is called Velocity http://blogs.msdn.com/b/velocity/ 仅供参考:微软的memcache等效名为Velocity http://blogs.msdn.com/b/velocity/

You can use Memcache on Windows as well. 您也可以在Windows上使用Memcache。 A very good version of Memcache is available from Northscale . Northscale提供了一个非常好的Memcache版本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM