OutputCacheProfile クラス

定義

アプリケーション ページによって使用できる出力キャッシュ プロファイルを構成します。 このクラスは継承できません。

public ref class OutputCacheProfile sealed : System::Configuration::ConfigurationElement
public sealed class OutputCacheProfile : System.Configuration.ConfigurationElement
type OutputCacheProfile = class
    inherit ConfigurationElement
Public NotInheritable Class OutputCacheProfile
Inherits ConfigurationElement
継承
OutputCacheProfile

次のコード例は、 コレクションを使用 OutputCacheProfiles してそのオブジェクトにアクセスする方法を OutputCacheProfile 示しています。

  // Get the Web application configuration.
  System.Configuration.Configuration webConfig =
  WebConfigurationManager.OpenWebConfiguration("/aspnetTest");

 // Get the section.

  string configPath = 
      "system.web/caching/outputCacheSettings";
  System.Web.Configuration.OutputCacheSettingsSection outputCacheSettings =
  (System.Web.Configuration.OutputCacheSettingsSection)webConfig.GetSection(
  configPath);

// Get the profile at zero index.
System.Web.Configuration.OutputCacheProfile outputCacheProfile = 
  outputCacheSettings.OutputCacheProfiles[0];

  ' Get the Web application configuration.
  Dim webConfig _
  As System.Configuration.Configuration = _
  WebConfigurationManager.OpenWebConfiguration( _
  "/aspnetTest")

  ' Get the section.
  Dim configPath As String = _
 "system.web/caching/outputCacheSettings"
  Dim outputCacheSettings _
  As System.Web.Configuration.OutputCacheSettingsSection = _
  CType(webConfig.GetSection(configPath), _
  System.Web.Configuration.OutputCacheSettingsSection)

' Get the profile at zero index.
  Dim outputCacheProfile _
  As System.Web.Configuration.OutputCacheProfile = _
  outputCacheSettings.OutputCacheProfiles(0)

注釈

クラスはOutputCacheProfile、構成ファイルの セクションの セクションの outputCacheProfiles 要素にプログラムでcachingアクセスして変更addする方法を提供します。

オブジェクトは OutputCacheProfile 、依存関係、キャッシュの場所、キャッシュの有効期限などの頻繁に使用される構成設定を一元化するため、すべてのページで指定する必要がなくなります。

ディレクティブの OutputCacheProfile 属性を使用して、 を CacheProfile ページに @ OutputCache 適用できます。

注意

ディレクティブは @ OutputCache 、 属性を除くオブジェクトに OutputCacheProfile 含まれるすべての設定を Enabled オーバーライドできます。 これは、 をオーバーライドしたすべてのページの ディレクティブを変更せずに を有効または無効に OutputCacheProfile するためです。

クラスは CacheDependency 依存関係を監視して、キャッシュされた項目が変更されると、キャッシュされた項目が自動的に削除されるようにします。

コンストラクター

OutputCacheProfile(String)

OutputCacheProfile クラスの新しいインスタンスを初期化します。

プロパティ

CurrentConfiguration

現在の Configuration インスタンスが属している構成階層を表す最上位の ConfigurationElement インスタンスへの参照を取得します。

(継承元 ConfigurationElement)
Duration

ページまたはコントロールがキャッシュされる時間を取得または設定します。

ElementInformation

ElementInformation オブジェクトのカスタマイズできない情報と機能を格納する ConfigurationElement オブジェクトを取得します。

(継承元 ConfigurationElement)
ElementProperty

ConfigurationElementProperty オブジェクト自体を表す ConfigurationElement オブジェクトを取得します。

(継承元 ConfigurationElement)
Enabled

キャッシングが有効かどうかを示す値を取得または設定します。

EvaluationContext

ContextInformation オブジェクトの ConfigurationElement オブジェクトを取得します。

(継承元 ConfigurationElement)
HasContext

CurrentConfiguration プロパティが null であるかどうかを示す値を取得します。

(継承元 ConfigurationElement)
Item[ConfigurationProperty]

この構成要素のプロパティまたは属性を取得または設定します。

(継承元 ConfigurationElement)
Item[String]

この構成要素のプロパティ、属性、または子要素を取得または設定します。

(継承元 ConfigurationElement)
Location

出力キャッシュ場所を取得または設定します。

LockAllAttributesExcept

ロックされている属性のコレクションを取得します。

(継承元 ConfigurationElement)
LockAllElementsExcept

ロックされている要素のコレクションを取得します。

(継承元 ConfigurationElement)
LockAttributes

ロックされている属性のコレクションを取得します。

(継承元 ConfigurationElement)
LockElements

ロックされている要素のコレクションを取得します。

(継承元 ConfigurationElement)
LockItem

要素がロックされているかどうかを示す値を取得または設定します。

(継承元 ConfigurationElement)
Name

OutputCacheProfile 名を取得または設定します。

NoStore

二次保存が有効かどうかを示す値を取得または設定します。

Properties

プロパティのコレクションを取得します。

(継承元 ConfigurationElement)
SqlDependency

SqlDependency プロパティを取得または設定します。

VaryByContentEncoding

キャッシュする、セミコロンで区切られた一連のコンテンツのエンコードを取得または設定します。

VaryByControl

VaryByControl プロパティを取得または設定します。

VaryByCustom

VaryByCustom プロパティを取得または設定します。

VaryByHeader

VaryByHeader プロパティを取得または設定します。

VaryByParam

VaryByParam プロパティを取得または設定します。

メソッド

DeserializeElement(XmlReader, Boolean)

構成ファイルから XML を読み取ります。

(継承元 ConfigurationElement)
Equals(Object)

現在の ConfigurationElement インスタンスを、指定したオブジェクトと比較します。

(継承元 ConfigurationElement)
GetHashCode()

現在の ConfigurationElement インスタンスを表す一意の値を取得します。

(継承元 ConfigurationElement)
GetTransformedAssemblyString(String)

指定されたアセンブリ名を変換して返します。

(継承元 ConfigurationElement)
GetTransformedTypeString(String)

指定された型名を変換して返します。

(継承元 ConfigurationElement)
GetType()

現在のインスタンスの Type を取得します。

(継承元 Object)
Init()

ConfigurationElement オブジェクトを初期状態に設定します。

(継承元 ConfigurationElement)
InitializeDefault()

ConfigurationElement オブジェクトの既定の値セットを初期化するために使用します。

(継承元 ConfigurationElement)
IsModified()

派生クラスに実装された場合、この構成要素が最後の保存または読み込み以降に変更されたかどうかを示します。

(継承元 ConfigurationElement)
IsReadOnly()

ConfigurationElement オブジェクトが読み取り専用かどうかを示す値を取得します。

(継承元 ConfigurationElement)
ListErrors(IList)

この ConfigurationElement オブジェクトおよびすべてのサブ要素の無効なプロパティのエラーを、渡されたリストに追加します。

(継承元 ConfigurationElement)
MemberwiseClone()

現在の Object の簡易コピーを作成します。

(継承元 Object)
OnDeserializeUnrecognizedAttribute(String, String)

逆シリカル化中に不明な属性が発生したかどうかを示す値を取得します。

(継承元 ConfigurationElement)
OnDeserializeUnrecognizedElement(String, XmlReader)

逆シリカル化中に不明な要素が発生したかどうかを示す値を取得します。

(継承元 ConfigurationElement)
OnRequiredPropertyNotFound(String)

必要なプロパティが見つからないと例外がスローされます。

(継承元 ConfigurationElement)
PostDeserialize()

逆シリアル化後に呼び出されます。

(継承元 ConfigurationElement)
PreSerialize(XmlWriter)

シリアル化前に呼び出されます。

(継承元 ConfigurationElement)
Reset(ConfigurationElement)

ConfigurationElement オブジェクトの内部状態 (ロックやプロパティ コレクションなど) をリセットします。

(継承元 ConfigurationElement)
ResetModified()

IsModified() メソッドの値が派生クラスに実装されたときに、false にリセットします。

(継承元 ConfigurationElement)
SerializeElement(XmlWriter, Boolean)

派生クラスに実装されている場合、この構成要素の内容を構成ファイルに書き込みます。

(継承元 ConfigurationElement)
SerializeToXmlElement(XmlWriter, String)

派生クラスに実装されている場合、この構成要素の外側のタグを構成ファイルに書き込みます。

(継承元 ConfigurationElement)
SetPropertyValue(ConfigurationProperty, Object, Boolean)

プロパティを指定した値に設定します。

(継承元 ConfigurationElement)
SetReadOnly()

IsReadOnly() オブジェクトおよびすべてのサブ要素に ConfigurationElement プロパティを設定します。

(継承元 ConfigurationElement)
ToString()

現在のオブジェクトを表す文字列を返します。

(継承元 Object)
Unmerge(ConfigurationElement, ConfigurationElement, ConfigurationSaveMode)

保存しないすべての値を削除するには、ConfigurationElement オブジェクトを変更します。

(継承元 ConfigurationElement)

適用対象

こちらもご覧ください