System.Web.HttpContext.Current.Cache与System.Web.HttpRuntime.Cache指向同一个引用
来源:互联网 发布:c语言是否窗口 编辑:程序博客网 时间:2024/06/07 05:34
System.Web.HttpContext.Current.Cache查看源码后,这里的Cache对象引用的是System.Web.HttpRuntime.Cache的静态变量
/// <devdoc> /// <para> /// Gets a reference to the System.Web.Cache.Cache object for the current request. /// </para> /// </devdoc> public Cache Cache { get { return HttpRuntime.Cache;} }
源码地址:https://referencesource.microsoft.com/#System.Web/HttpContext.cs
虽然两者指向了同一个引用,但是HttpContext.Current.Cache很明显只适用Web当前上下文,HttpContext.Current变量及HttpContext对象只适用Web上下文
/// <devdoc> /// <para>Returns the current HttpContext object.</para> /// </devdoc> public static HttpContext Current { get {#if DBG if (NeedDebugAssertOnAccessToCurrent) { Debug.Assert(ContextBase.Current != null); }#endif return ContextBase.Current as HttpContext; } set { ContextBase.Current = value; } }
0 0
- System.Web.HttpContext.Current.Cache与System.Web.HttpRuntime.Cache指向同一个引用
- System.Web.HttpContext.Current.Cache 与System.Web.HttpRuntime.Cache
- System.Web.HttpContext.Current.Cache和System.Web.HttpRuntime.Cache有什么区别?
- Cache及(HttpRuntime.Cache与HttpContext.Current.Cache)
- HttpContext.Current.Cache 与HttpRuntime.Cache的区别
- HttpRuntime.Cache vs. HttpContext.Current.Cache
- HttpRuntime.Cache vs. HttpContext.Current.Cache
- HttpRuntime.Cache vs. HttpContext.Current.Cache
- HttpContext.Current.Cache vs. HttpRuntime.Cache
- HttpContext.Current.Cache vs. HttpRuntime.Cache
- HttpContext.Current.Cache 和 HttpRuntime.Cache
- HttpContext.Current.Cache vs. HttpRuntime.Cache
- HttpRuntime.Cache vs. HttpContext.Current.Cache
- HttpContext.Current.Cache vs. HttpRuntime.Cache
- HttpContext.Current.Cache vs. HttpRuntime.Cache
- HttpContext.Current.Cache 和 HttpRuntime.Cache
- HttpContext.Current.Cache 和 HttpRuntime.Cache
- System.Web.HttpContext.Current是什么
- springmvc工程文件上传下载
- poj 3096 Surprising Strings
- nginx隐藏版本信息
- 文件格式转换小工具
- C++ STL标准入门汇总
- System.Web.HttpContext.Current.Cache与System.Web.HttpRuntime.Cache指向同一个引用
- 新签名文件配置方式
- 特征的转换_05-标签索引的转换与特征的组合
- jquery 设置浏览器屏蔽键盘回退功能
- iOS子线程更新UI的两种方法
- 对话框中添加状态栏
- 大数据测试类型&大数据测试步骤
- Android中使用level-list改变View显示状态
- EL表达式、基本语法、隐式对象,禁用EL表达式,EL主要作用