GetCacheOptions 方法

返回项的缓存配置以及说明项的缓存副本何时到期的设置。此方法适用于报表和数据集项类型。

命名空间:  ReportService2010
程序集:  ReportService2010(在 ReportService2010.dll 中)

语法

声明
<SoapHeaderAttribute("ServerInfoHeaderValue", Direction := SoapHeaderDirection.Out)> _
<SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer/GetCacheOptions", 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("TrustedUserHeaderValue")> _
Public Function GetCacheOptions ( _
    ItemPath As String, _
    <OutAttribute> ByRef Item As ExpirationDefinition _
) As Boolean
用法
Dim instance As ReportingService2010
Dim ItemPath As String
Dim Item As ExpirationDefinition
Dim returnValue As Boolean

returnValue = instance.GetCacheOptions(ItemPath, _
    Item)
[SoapHeaderAttribute("ServerInfoHeaderValue", Direction = SoapHeaderDirection.Out)]
[SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer/GetCacheOptions", 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("TrustedUserHeaderValue")]
public bool GetCacheOptions(
    string ItemPath,
    out ExpirationDefinition Item
)
[SoapHeaderAttribute(L"ServerInfoHeaderValue", Direction = SoapHeaderDirection::Out)]
[SoapDocumentMethodAttribute(L"https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer/GetCacheOptions", 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"TrustedUserHeaderValue")]
public:
bool GetCacheOptions(
    String^ ItemPath, 
    [OutAttribute] ExpirationDefinition^% Item
)
[<SoapHeaderAttribute("ServerInfoHeaderValue", Direction = SoapHeaderDirection.Out)>]
[<SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer/GetCacheOptions", 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("TrustedUserHeaderValue")>]
member GetCacheOptions : 
        ItemPath:string * 
        Item:ExpirationDefinition byref -> bool 
public function GetCacheOptions(
    ItemPath : String, 
    Item : ExpirationDefinition
) : boolean

参数

  • ItemPath
    类型:System. . :: . .String
    项的完全限定 URL,其中包括文件名(在 SharePoint 模式下,还有扩展名)。

返回值

类型:System. . :: . .Boolean
如果将已执行项的副本放入缓存,则为 true;否则为 false。

注释

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

SOAP Header Usage

(In) TrustedUserHeaderValue

(Out) ServerInfoHeaderValue

Native Mode Required Permissions

ReadPolicy

SharePoint Mode Required Permissions

ViewListItems()()()()

Use the return value of this method to evaluate whether the item is set to be cached. If the value is false, the method returns a null Nothing nullptr unit null 引用(在 Visual Basic 中为 Nothing) (or Nothing in Visual Basic) for Item.

Use this method only if the execution option is configured to run on demand. For more information about the cache settings of an item, see Reporting Services 中的报表缓存功能. For information about programmatically setting the caching options of an item, see the SetCacheOptions method.