APGen Documentation Previous Topic: ASPCache.Expiration() Next Topic: ASPCache.TimeInCache() Parent Topic: ASPCache Object    ASPCache Object
ASPCache.SetExpiration()
See Also:

Sets the period of time (in milliseconds) an item can live in the cache before it expires.

Syntax

VBScript:

Cache.SetExpiration( key, lifetime )

JScript:

Cache.SetExpiration( key, lifetime );

Object

Cache An ASPCache object.

Parameters

key A string key or item handle.
lifetime The period of time (in milliseconds) for the item to live before it expires.  This is an integer, not a date or time.

If this value is 0 or negative, the item will not be expired.

Notes

The expiration period starts when SetExpiration() is called.  After lifetime milliseconds elapse, the item expires and cannot be accessed.

The expiration period may be modified at any time before the object is removed.

For more information on expiration, see the Expiration topic.