Packagenet.guttershark.util.cache
Classpublic final class CacheItem

The CacheItem class is used internally to a Cache instance. Each item in a Cache that is stored, is wrapped by this CacheItem instance to allow for expirations at an object level.

This class does not need to be used in order to store something in a Cache.

See also

net.guttershark.util.cache.Cache


Public Properties
 PropertyDefined by
  cacheKey : String
The key that was used in the actual cache.
CacheItem
  object : *
The stored data.
CacheItem
  timeout : int
The timeout to expire.
CacheItem
Public Methods
 MethodDefined by
  
CacheItem(key:String, object:Function, purgeCallback:int, timeout:* = -1)
Constructor for CacheItem instances.
CacheItem
  
dispose():void
Destroy this cache items internal variables.
CacheItem
Property detail
cacheKeyproperty
public var cacheKey:String

The key that was used in the actual cache.

objectproperty 
public var object:*

The stored data.

timeoutproperty 
public var timeout:int

The timeout to expire.

Constructor detail
CacheItem()constructor
public function CacheItem(key:String, object:Function, purgeCallback:int, timeout:* = -1)

Constructor for CacheItem instances.

Parameters
key:String — The key to store the object by.
 
object:Function — The object you want stored by key.
 
purgeCallback:int — The callback function that purges this object.
 
timeout:* (default = -1) — The timeout in which to expie this object.
Method detail
dispose()method
public function dispose():void

Destroy this cache items internal variables.