欧美性猛交xxx嘿人猛交_又色又爽又高潮免费观看_精品国产一区二区三区久久影院_青娱乐极品视觉盛宴国产视频

技術頻道導航
HTML/CSS
.NET技術
IIS技術
PHP技術
Js/JQuery
Photoshop
Fireworks
服務器技術
操作系統
網站運營

贊助商

分類目錄

贊助商

最新文章

搜索

CacheProfile實例 OutputCache緩存時間優先outputCacheProfiles

作者:admin    時間:2012-11-19 23:55:43    瀏覽:

CacheProfile是OutputCache緩存的一個參數,用于定義與該頁關聯的緩存設置的名稱。是可選屬性,默認值為空字符("")。

需要注意的是,包含在用戶控件中的@ OutputCache指令不支持此屬性。在頁面中指定此屬性時,屬性值必須與Web.config文件<outputCacheSettings>配置節下的outputCacheProfiles元素中的一個可用項的名稱匹配。如果此名稱與配置文件項不匹配,將引發異常。

CacheProfile 屬性

獲取或設置 OutputCacheProfile 名稱,該名稱與輸出緩存項的設置關聯。
命名空間:   System.Web.UI
程序集:  System.Web(在 System.Web.dll 中)

◇語法:

Public Property CacheProfile As String
1. public string CacheProfile { get; set; }

public:

property String^ CacheProfile {
 String^ get ();
 void set (String^ value);
}
member CacheProfile : string with get, set

◇屬性值
類型: SystemString
與輸出緩存項的設置關聯的 OutputCacheProfile 名稱。

◇備注
配置文件標識 <outputCacheSettings> 配置中的一組緩存設置(用作輸出緩存項的基本設置)。

◇版本信息
.NET Framework
受以下版本支持:4.5、4、3.5、3.0、2.0

◇平臺
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008(不支持服務器核心角色), Windows Server 2008 R2(支持帶 SP1 或更高版本的服務器核心角色;不支持 Itanium)

.NET Framework 并不是對每個平臺的所有版本都提供支持。

示例:

<%@ OutputCache CacheProfile="Cache30Seconds" %>

配置:

Web.config

<caching>
  <outputCacheSettings>
    <outputCacheProfiles>
      <add name="Cache30Seconds" duration="30"
        varyByParam="none" />
    </outputCacheProfiles>
  </outputCacheSettings>
</caching>

Add節里面的各個屬性和OutPutCache相對應

注意:

OutputCache生命優先于outputCacheProfiles配置,比如:OutputCache頁面緩存10s,outputCacheProfiles設置緩存20s,則最后緩存10s。查看OutputCache緩存使用的詳細介紹

x