APGen Documentation Previous Topic: ASPCache.Add() Next Topic: ASPCache.KeyOf() Parent Topic: ASPCache Object    ASPCache Object
ASPCache.Exists()
See Also:

Returns True if the cache contains an item with this key or handle.

Syntax

VBScript:

bExists = Cache.Exists( key )

JScript:

bExists = Cache.Exists( key );

Object

Cache An ASPCache object.

Parameters

key A string key or item handle.

Return Value

bExists True if the item exists in the cache.  False if it doesn't exist.

Notes

This example checks whether an item exists before modifying its value.

Dim key, vNewValue
' Assume these variables have been set

' Check if the item exists
If (Cache.Exists(key)) Then

     ' Update the item's value
     Cache(key) = vNewValue

End If