简体   繁体   English

在Azure上缓存ASP.NET页面

[英]Caching ASP.NET Pages on Azure

Are there any special considerations when Caching ASP.NET Pages on Azure? 在Azure上缓存ASP.NET页时是否有任何特殊注意事项? I understand that page caching is managed in memory by IIS, but does it rely on the same providers as asp.net caching? 我知道页面缓存是由IIS在内存中管理的,但是它依赖与asp.net缓存相同的提供程序吗?

I need to cache hundreds of pages each averaging 100KB and I wonder if this will function on Azure as expected because there is a memory limitation considerations on Azure. 我需要缓存数百个平均大小为100KB的页面,并且我想知道这是否可以在Azure上正常运行,因为在Azure上存在内存限制方面的考虑。

I'd recommend Azure Cache services for Output Caching ASP.NET pages. 我建议将Azure缓存服务用于输出缓存 ASP.NET页。 It's simple to configure and can be used by all VM nodes in your deployment. 它配置简单,并且可供部署中的所有VM节点使用。

Azure Cache relies on DistributedCacheOutputCacheProvider . Azure缓存依赖于DistributedCacheOutputCacheProvider You can also control your Cache Quota size . 您还可以控制缓存配额大小

Completely agree with @SilverNonja comments however I just wanted to comment about "Memory limitation consideration on Azure". 完全同意@SilverNonja的评论,但是我只想评论“ Azure的内存限制注意事项”。 I don't consider your objective is limited due to the limitation in Windows Azure memory because you sure can get a lot in single VM however can u server that many user from one single VM. 我不认为您的目标会由于Windows Azure内存的限制而受到限制,因为您肯定可以在单个VM中获得大量资源,但是您可以从一个VM中为多个用户提供服务。 You really have to run multiple instances of same application and then having the local machine specific cache is the problem. 您确实必须运行同一应用程序的多个实例,然后才具有本地计算机特定的缓存。

With Cloud solution where you have more then one instances are running creating a local cache based solutions bring several problems because the requests are being served by different instances at different times. 在云解决方案中,有多个实例正在运行,因此创建基于本地缓存的解决方案会带来一些问题,因为请求是由不同实例在不同时间提供的。 Having a centralize location for shared resources is the best where all the instances can look for the data is the best method and that's why Windows Azure Cache is the best/fast option available for you to use. 对于所有实例都可以查找数据的最佳位置,最好是拥有一个共享资源的集中位置,这就是最好的方法,这就是Windows Azure缓存是供您使用的最佳/快速选项的原因。

Also here is very Simple Sample to use Azure Cache with ASP.NET application: https://www.windowsazure.com/en-us/develop/net/how-to-guides/cache/ 另外,这里还有一个非常简单的示例,可以将Azure缓存与ASP.NET应用程序一起使用: https : //www.windowsazure.com/en-us/develop/net/how-to-guides/cache/

You might wanna try the latest Windows Azure Caching (Preview). 您可能想尝试最新的Windows Azure缓存(预览)。 It has a better feature set and improved latencies. 它具有更好的功能集和更高的延迟。 For more info - http://social.msdn.microsoft.com/Forums/en-US/windowsazuredata/thread/9a2dbd9f-1b9d-4249-a48b-216d9dfdc2bc 有关更多信息-http: //social.msdn.microsoft.com/Forums/zh-CN/windowsazuredata/thread/9a2dbd9f-1b9d-4249-a48b-216d9dfdc2bc

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

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