AspNetCacheProfileAttribute クラス

定義

サービス操作に適用された場合に、構成ファイル内の ASP.NET 出力キャッシュ プロファイルを示します。WCF は、この構成ファイルを使用して ASP .NET 出力キャッシュに操作の応答をキャッシュします。

public ref class AspNetCacheProfileAttribute sealed : Attribute, System::ServiceModel::Description::IOperationBehavior
[System.AttributeUsage(System.AttributeTargets.Method)]
public sealed class AspNetCacheProfileAttribute : Attribute, System.ServiceModel.Description.IOperationBehavior
[<System.AttributeUsage(System.AttributeTargets.Method)>]
type AspNetCacheProfileAttribute = class
    inherit Attribute
    interface IOperationBehavior
Public NotInheritable Class AspNetCacheProfileAttribute
Inherits Attribute
Implements IOperationBehavior
継承
AspNetCacheProfileAttribute
属性
実装

次の例は、AspNetCacheProfileAttribute 属性をサービス操作に適用する方法を示しています。 この場合、"CacheFor60Seconds" という名前のキャッシュ プロファイルが操作に GetCustomer 使用されます

次の構成スニペットは、"CacheFor60Seconds" キャッシュ プロファイルの指定方法を示しています。

<configuration>  
    <system.web>  
      <compilation debug="true" targetFramework="4.0" />  
      <caching>  
        <outputCacheSettings>  
          <outputCacheProfiles>  
            <add name="CacheFor60Seconds" duration="60" varyByParam="format" varyByHeader="Accept" />  
          </outputCacheProfiles>  
        </outputCacheSettings>  
      </caching>  
    </system.web>  
</configuration>  

注釈

出力キャッシュ プロファイルで実行できる設定の種類の詳細については、「 ASP.NET キャッシュ設定」を参照してください。

コンストラクター

AspNetCacheProfileAttribute(String)

キャッシュ プロファイル名を指定して、AspNetCacheProfileAttribute クラスの新しいインスタンスを初期化します。

プロパティ

CacheProfileName

キャッシュ プロファイルの名前を取得します。

TypeId

派生クラスで実装されると、この Attribute の一意の識別子を取得します。

(継承元 Attribute)

メソッド

AddBindingParameters(OperationDescription, BindingParameterCollection)

AddBindingParameters(OperationDescription, BindingParameterCollection) の実装。 WCF インフラストラクチャによって使用されます。開発者が使用することは想定されていません。

ApplyClientBehavior(OperationDescription, ClientOperation)

ApplyClientBehavior(OperationDescription, ClientOperation) メソッドの実装。 WCF インフラストラクチャによって使用されます。開発者が使用することは想定されていません。

ApplyDispatchBehavior(OperationDescription, DispatchOperation)

ApplyDispatchBehavior(OperationDescription, DispatchOperation) メソッドの実装。 WCF インフラストラクチャによって使用されます。開発者が使用することは想定されていません。

Equals(Object)

このインスタンスが、指定されたオブジェクトと等価であるかどうかを示す値を返します。

(継承元 Attribute)
GetHashCode()

このインスタンスのハッシュ コードを返します。

(継承元 Attribute)
GetType()

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

(継承元 Object)
IsDefaultAttribute()

派生クラスでオーバーライドされるとき、このインスタンスの値が派生クラスの既定値であるかどうかを示します。

(継承元 Attribute)
Match(Object)

派生クラス内でオーバーライドされたときに、指定したオブジェクトとこのインスタンスが等しいかどうかを示す値を返します。

(継承元 Attribute)
MemberwiseClone()

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

(継承元 Object)
ToString()

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

(継承元 Object)
Validate(OperationDescription)

Validate(OperationDescription) メソッドの実装。 WCF インフラストラクチャによって使用されます。開発者が使用することは想定されていません。

明示的なインターフェイスの実装

_Attribute.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr)

一連の名前を対応する一連のディスパッチ識別子に割り当てます。

(継承元 Attribute)
_Attribute.GetTypeInfo(UInt32, UInt32, IntPtr)

オブジェクトの型情報を取得します。この情報はインターフェイスの型情報の取得に使用できます。

(継承元 Attribute)
_Attribute.GetTypeInfoCount(UInt32)

オブジェクトが提供する型情報インターフェイスの数 (0 または 1) を取得します。

(継承元 Attribute)
_Attribute.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr)

オブジェクトによって公開されたプロパティおよびメソッドへのアクセスを提供します。

(継承元 Attribute)

適用対象