次の方法で共有


SystemWebCachingSectionGroup クラス

定義

構成ファイル内の caching グループを構成します。 このクラスは継承できません。

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

次のコード例は、既存の Web アプリケーションに関連付けられている構成ファイルから SystemWebCachingSectionGroup オブジェクトを取得する方法を示しています。 このオブジェクトを使用して、 caching グループに含まれるセクションにアクセスできます。


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

// Get the <caching> section group.
SystemWebCachingSectionGroup cachingSectionGroup =
  (SystemWebCachingSectionGroup)configuration.GetSectionGroup(
  "system.web/caching");
' Get the Web application configuration.
Dim configuration _
As System.Configuration.Configuration = _
WebConfigurationManager.OpenWebConfiguration( _
"/aspnetTest")

' Get the <caching> section group.
Dim cachingSectionGroup _
As SystemWebCachingSectionGroup = _
CType(configuration.GetSectionGroup( _
"system.web/caching"), SystemWebCachingSectionGroup)

注釈

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

SystemWebCachingSectionGroup クラスと caching セクションでは、サイトまたはアプリケーションのキャッシュ メカニズムを一元的に制御できます。 これにより、アプリケーション内の個々のページを変更することなく、キャッシュをデプロイ、変更、無効化できます。

ASP.NET キャッシュ メカニズムは、 Cache クラスによって実装されます。 詳細については、「 ASP.NET キャッシュの概要」を参照してください。

次の一覧では、ASP.NET が提供する 2 種類のキャッシュについて説明します。

  • 1 つ目は出力キャッシュと呼ばれ、動的ページとユーザー コントロールの応答を格納できます。 後続の要求では、ページまたはユーザー コントロール コードは実行されません。キャッシュされた出力は、要求を満たすために使用されます。 OutputCacheプロパティとOutputCacheSettingsプロパティを使用して、出力キャッシュ設定にアクセスできます。

  • 2 番目の種類のキャッシュは、従来のアプリケーション データ キャッシュです。これを使用すると、任意のオブジェクトをプログラムでサーバー メモリに格納して、アプリケーションで再作成にかかる時間とリソースを節約できます。 これらのキャッシュ設定には、 Cache プロパティを使用してアクセスできます。

コンストラクター

名前 説明
SystemWebCachingSectionGroup()

SystemWebCachingSectionGroupの新しいインスタンスを作成します。

プロパティ

名前 説明
Cache

構成に含まれる cache セクションを取得します。

IsDeclarationRequired

この ConfigurationSectionGroup オブジェクト宣言が必要かどうかを示す値を取得します。

(継承元 ConfigurationSectionGroup)
IsDeclared

この ConfigurationSectionGroup オブジェクトが宣言されているかどうかを示す値を取得します。

(継承元 ConfigurationSectionGroup)
Name

この ConfigurationSectionGroup オブジェクトの name プロパティを取得します。

(継承元 ConfigurationSectionGroup)
OutputCache

構成に含まれる outputCache セクションを取得します。

OutputCacheSettings

構成に含まれる outputCacheSettings セクションを取得します。

SectionGroupName

この ConfigurationSectionGroupに関連付けられているセクション グループ名を取得します。

(継承元 ConfigurationSectionGroup)
SectionGroups

このConfigurationSectionGroupCollection オブジェクトの子であるすべてのConfigurationSectionGroup オブジェクトを含むConfigurationSectionGroup オブジェクトを取得します。

(継承元 ConfigurationSectionGroup)
Sections

このConfigurationSectionCollection オブジェクト内のすべてのConfigurationSection オブジェクトを含むConfigurationSectionGroup オブジェクトを取得します。

(継承元 ConfigurationSectionGroup)
SqlCacheDependency

構成に含まれる sqlCacheDependency セクションを取得します。

Type

この ConfigurationSectionGroup オブジェクトの型を取得または設定します。

(継承元 ConfigurationSectionGroup)

メソッド

名前 説明
Equals(Object)

指定したオブジェクトが現在のオブジェクトと等しいかどうかを判断します。

(継承元 Object)
ForceDeclaration()

この ConfigurationSectionGroup オブジェクトの宣言を強制します。

(継承元 ConfigurationSectionGroup)
ForceDeclaration(Boolean)

この ConfigurationSectionGroup オブジェクトの宣言を強制します。

(継承元 ConfigurationSectionGroup)
GetHashCode()

既定のハッシュ関数として機能します。

(継承元 Object)
GetType()

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

(継承元 Object)
MemberwiseClone()

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

(継承元 Object)
ShouldSerializeSectionGroupInTargetVersion(FrameworkName)

指定したターゲット バージョンの .NET Framework に対して構成オブジェクト階層をシリアル化するときに、現在の ConfigurationSectionGroup インスタンスをシリアル化する必要があるかどうかを示します。

(継承元 ConfigurationSectionGroup)
ToString()

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

(継承元 Object)

適用対象

こちらもご覧ください