写入**[T:HYPERLINK"https://msdn.microsoft.com/en-us/library/system.web.caching.aspx"System.Web.Caching.Cache]**基于键的项。
命名空间: Microsoft.SharePoint.WebPartPages
程序集: Microsoft.SharePoint(位于 Microsoft.SharePoint.dll 中)
语法
声明
Protected Overrides Sub DfwpCacheWrite ( _
storage As Storage, _
key As String, _
forceSharedAppCache As Boolean, _
value As Object, _
timeoutSecs As Integer _
)
用法
Dim storage As Storage
Dim key As String
Dim forceSharedAppCache As Boolean
Dim value As Object
Dim timeoutSecs As Integer
Me.DfwpCacheWrite(storage, key, forceSharedAppCache, _
value, timeoutSecs)
protected override void DfwpCacheWrite(
Storage storage,
string key,
bool forceSharedAppCache,
Object value,
int timeoutSecs
)
参数
storage
类型:Microsoft.SharePoint.WebPartPages.Storage一个枚举,指定如何将存储该属性。
key
类型:System.String要写入的缓存项的 ID。
forceSharedAppCache
类型:System.Boolean若要防止缓存的代码生成密钥范围限定为当前页或 Web 部件的状态 ; true否则为false。
value
类型:System.Object一个代表项目的对象。
timeoutSecs
类型:System.Int3232 位有符号的整数值,该值代表的时间以秒为单位,直到缓存的项目的过期时间。
备注
如果IsGhostedtrue ,并且storageShared,此重写会将项插入CachetimeoutSecs过期。