ReportingService2010.SetCacheOptions Method (String, Boolean, ExpirationDefinition)

 

Applies To: SQL Server 2016 Preview

Configures an item to be cached and provides settings that specify when the cached copy of the item expires. This method applies to the Report and Dataset item types.

Namespace:   ReportService2010
Assembly:  ReportService2010 (in ReportService2010.dll)

Syntax

[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
)
public:
[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")]
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
<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
)

Parameters

  • ItemPath
    Type: System.String

    The fully qualified URL of the item including the file name and, in SharePoint mode, the extension.

  • CacheItem
    Type: System.Boolean

    A Boolean value that indicates whether a copy of the executed item is put in cache. The default value is false.

Remarks

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 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.

See Also

ReportingService2010 Class
ReportService2010 Namespace

Return to top