다음을 통해 공유


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입니다.

주의

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.