SetCacheOptions 方法

配置要缓存的项并提供指定项的缓存副本何时到期的设置。此方法适用于报表和数据集项类型。

命名空间:  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
    项的完全限定 URL,其中包括文件名(在 SharePoint 模式下,还有扩展名)。
  • CacheItem
    类型:System. . :: . .Boolean
    一个布尔值,该值指示是否将已执行项的副本放入缓存。默认值为 false。

注释

The table below shows header and permissions information on this operation.

SOAP Header Usage

(In) TrustedUserHeaderValue

(Out) ServerInfoHeaderValue

Native Mode Required Permissions

UpdatePolicy

SharePoint Mode Required Permissions

EditListItems()()()()

If CacheItem is set to false, you must set the value for Item to null Nothing nullptr unit null 引用(在 Visual Basic 中为 Nothing) (Nothing in Visual Basic); otherwise, an error occurs. If CacheItem is set to true, you must provide a value for Item; otherwise, a error occurs.

This method can be called only when the execution option for the item is set to Live. For more information about how to set execution options programmatically, see SetExecutionOptions.