AspNetCacheProfileAttribute クラス
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
サービス操作に適用する場合は、構成ファイル内の 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 属性をサービス操作に適用する方法を示しています。 この場合、"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 Cache Settings」を参照してください。
コンストラクター
| 名前 | 説明 |
|---|---|
| AspNetCacheProfileAttribute(String) |
指定したキャッシュ プロファイル名を使用して、 AspNetCacheProfileAttribute クラスの新しいインスタンスを初期化します。 |
プロパティ
| 名前 | 説明 |
|---|---|
| CacheProfileName |
キャッシュ プロファイルの名前を取得します。 |
| TypeId |
派生クラスで実装されている場合は、この Attributeの一意の識別子を取得します。 (継承元 Attribute) |
メソッド
明示的なインターフェイスの実装
| 名前 | 説明 |
|---|---|
| _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) |