次の方法で共有


SetCacheOptions メソッド

アイテムをキャッシュ用に構成し、キャッシュ内のアイテムの有効期限を示す設定を提供します。このメソッドは、アイテムの種類 Report および Dataset に適用されます。

名前空間:  ReportService2010
アセンブリ:  ReportService2010 (ReportService2010.dll)

構文

'宣言
<SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer/SetCacheOptions", RequestNamespace := "https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer",  _
    ResponseNamespace := "https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer",  _
    Use := SoapBindingUse.Literal, ParameterStyle := SoapParameterStyle.Wrapped)> _
<SoapHeaderAttribute("ServerInfoHeaderValue", Direction := SoapHeaderDirection.Out)> _
<SoapHeaderAttribute("TrustedUserHeaderValue")> _
Public Sub SetCacheOptions ( _
    ItemPath As String, _
    CacheItem As Boolean, _
    Item As ExpirationDefinition _
)
'使用
Dim instance As ReportingService2010
Dim ItemPath As String
Dim CacheItem As Boolean
Dim Item As ExpirationDefinition

instance.SetCacheOptions(ItemPath, CacheItem, _
    Item)
[SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer/SetCacheOptions", RequestNamespace = "https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer", 
    ResponseNamespace = "https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer", 
    Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)]
[SoapHeaderAttribute("ServerInfoHeaderValue", Direction = SoapHeaderDirection.Out)]
[SoapHeaderAttribute("TrustedUserHeaderValue")]
public void SetCacheOptions(
    string ItemPath,
    bool CacheItem,
    ExpirationDefinition Item
)
[SoapDocumentMethodAttribute(L"https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer/SetCacheOptions", RequestNamespace = L"https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer", 
    ResponseNamespace = L"https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer", 
    Use = SoapBindingUse::Literal, ParameterStyle = SoapParameterStyle::Wrapped)]
[SoapHeaderAttribute(L"ServerInfoHeaderValue", Direction = SoapHeaderDirection::Out)]
[SoapHeaderAttribute(L"TrustedUserHeaderValue")]
public:
void SetCacheOptions(
    String^ ItemPath, 
    bool CacheItem, 
    ExpirationDefinition^ Item
)
[<SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer/SetCacheOptions", RequestNamespace = "https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer", 
    ResponseNamespace = "https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer", 
    Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)>]
[<SoapHeaderAttribute("ServerInfoHeaderValue", Direction = SoapHeaderDirection.Out)>]
[<SoapHeaderAttribute("TrustedUserHeaderValue")>]
member SetCacheOptions : 
        ItemPath:string * 
        CacheItem:bool * 
        Item:ExpirationDefinition -> unit 
public function SetCacheOptions(
    ItemPath : String, 
    CacheItem : boolean, 
    Item : ExpirationDefinition
)

パラメーター

  • ItemPath
    型: System. . :: . .String
    ファイル名と拡張子 (SharePoint モードの場合) を含む、アイテムの完全修飾 URL です。
  • CacheItem
    型: System. . :: . .Boolean
    実行されたアイテムのコピーをキャッシュに格納するかどうかを示す Boolean 値です。既定値は false です。

説明

次の表に、この操作に関連するヘッダーおよび権限の情報を示します。

SOAP ヘッダーの使用方法

(In) TrustedUserHeaderValue

(Out) ServerInfoHeaderValue

ネイティブ モードで必要な権限

UpdatePolicy

SharePoint モードで必要な権限

EditListItems()()()()

CacheItem に false を指定した場合、Item の値に NULL (Visual Basic では Nothing) を指定する必要があります。そうしない場合、エラーが発生します。CacheItem に true を指定した場合、Item に値を指定する必要があります。値を指定しないとエラーが発生します。

このメソッドは、アイテムの実行オプションに Live が設定されている場合にのみ呼び出すことができます。実行オプションをプログラムで設定する方法の詳細については、「SetExecutionOptions」を参照してください。