ReportingService2010.SetCacheOptions(String, Boolean, ExpirationDefinition) ReportingService2010.SetCacheOptions(String, Boolean, ExpirationDefinition) ReportingService2010.SetCacheOptions(String, Boolean, ExpirationDefinition) Method

定义

配置要缓存的项并提供指定项的缓存副本何时到期的设置。 Configures an item to be cached and provides settings that specify when the cached copy of the item expires. 此方法适用于ReportDataset项类型。 This method applies to the Report and Dataset item types.

public:
 void SetCacheOptions(System::String ^ ItemPath, bool CacheItem, ReportService2010::ExpirationDefinition ^ Item);
[System.Web.Services.Protocols.SoapDocumentMethod("http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer/SetCacheOptions", ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped, RequestNamespace="http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer", ResponseNamespace="http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer", Use=System.Web.Services.Description.SoapBindingUse.Literal)]
[System.Web.Services.Protocols.SoapHeader("ServerInfoHeaderValue", Direction=System.Web.Services.Protocols.SoapHeaderDirection.Out)]
[System.Web.Services.Protocols.SoapHeader("TrustedUserHeaderValue")]
public void SetCacheOptions (string ItemPath, bool CacheItem, ReportService2010.ExpirationDefinition Item);
Public Sub SetCacheOptions (ItemPath As String, CacheItem As Boolean, Item As ExpirationDefinition)
参数
ItemPath
String String String

项的完全限定 URL,其中包括文件名(在 SharePoint 模式下,还有扩展名)。 The fully qualified URL of the item including the file name and, in SharePoint mode, the extension.

CacheItem
Boolean Boolean Boolean

ABoolean值,该值指示是否执行项的副本将放入缓存。 A Boolean value that indicates whether a copy of the executed item is put in cache. 默认值是 false The default value is false.

Item
ExpirationDefinition ExpirationDefinition ExpirationDefinition

一个 ExpirationDefinition 对象,该对象表示缓存中的项的计划或到期时间。 An ExpirationDefinition object that represents either a schedule or an expiration time for the item in cache.

注解

下表显示了有关此操作的标头和权限信息。The table below shows header and permissions information on this operation.

SOAP 标头使用情况SOAP Header Usage (In) TrustedUserHeaderValue(In) TrustedUserHeaderValue

(Out) ServerInfoHeaderValue(Out) ServerInfoHeaderValue
纯模式所需的权限Native Mode Required Permissions UpdatePolicy
SharePoint 模式所需的权限SharePoint Mode Required Permissions EditListItems

如果CacheItem设置为false,你必须将值设置Itemnull(Nothing在 Visual Basic 中); 否则为将会出错。If CacheItem is set to false, you must set the value for Item to null (Nothing in Visual Basic); otherwise, an error occurs. 如果CacheItem设置为true,必须提供一个值Item; 否则为将发生错误。If CacheItem is set to true, you must provide a value for Item; otherwise, a error occurs.

可以调用此方法,仅在项的执行选项设置为LiveThis method can be called only when the execution option for the item is set to Live. 有关如何以编程方式设置执行选项的详细信息,请参阅SetExecutionOptionsFor more information about how to set execution options programmatically, see SetExecutionOptions.

适用于