System.Web.Cache和HTTPContext.Curent.Cache之间的区别 [英] Difference between System.Web.Cache and HTTPContext.Curent.Cache

查看:64
本文介绍了System.Web.Cache和HTTPContext.Curent.Cache之间的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

System.Web.Cache和HTTPContext.Curent.Cache有什么区别?在什么情况下都使用?

What is the difference between System.Web.Cache and HTTPContext.Curent.Cache? In which cases both are used?

推荐答案

System.Web.Caching.Cache:这是.NET缓存的实现.

System.Web.Caching.Cache: this is the implementation of .NET caching.

System.Web.HttpContext.Current.Cache:这是那个的实例实施,它存在于应用程序域.

System.Web.HttpContext.Current.Cache: this is the instance of that implementation, that lives in the application domain.

Cache类不适用于在ASP.NET应用程序外部使用.它经过设计和测试,可用于ASP.NET为Web提供缓存应用程序.在其他类型的应用程序,例如控制台应用程序或Windows窗体应用程序,ASP.NET缓存可能无法正常工作.

The Cache class is not intended for use outside of ASP.NET applications. It was designed and tested for use in ASP.NET to provide caching for Web applications. In other types of applications, such as console applications or Windows Forms applications, ASP.NET caching might not work correctly.

来自 msdn文章

这篇关于System.Web.Cache和HTTPContext.Curent.Cache之间的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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