Persistence

Determines when the cached item will be destroyed - Read/Write.

Syntax

object.Persistence [= value]

The Persistence property syntax has the following parts:

Part Description
object A valid WebCacheItem object
value A PersistenceTypes value.

Settings

The settings for value are:

Setting Description
ddPermanent 1 - Cached item will stay alive forever. The item has to be destroyed using an explicit WebCache.Remove call.
ddTimeout 2 - Cached item will remain in the cache for a time period specified by the end user via the WebCacheItem's Timeout property. A possible usage scenario is setting the Timeout property to the SessionTimeout value under IIS.
ddAccessedOnce 3 - Cached item is destroyed immediately after the client accesses the data one time

Data Type

PersistenceTypes

Example

'This example demonstrates how to use the
'Persistence property of the WebCachItem class.
'In the example "aWebCache" is a pre-existing
'variable dimensioned as webcache and it
'has been populated with a webcacheitem
 
Dim aWebCacheItem As New WebCacheItem
Set aWebCacheItem = aWebCache.Item(0)
 
aWebCacheItem.Persistence = 2

Remarks

Default value = ddAccessedOnce