Packageorg.openzoom.flash.utils
Classpublic final class Cache
ImplementsICache

Basic implementation of a cache that evicts lowest item in order in case its capacity has been reached.



Public Properties
 PropertyDefined by
  size : int
[read-only] Returns the size of the cache.
Cache
Public Methods
 MethodDefined by
  
Cache(size:int)
Constructor.
Cache
  
contains(key:*):Boolean
Returns true if cache has item at key and otherwise false
Cache
  
dispose():void
Releases all resources this object holds on to.
Cache
  
get(key:*):ICacheItem
Cache
  
put(key:*, item:ICacheItem):void
Put item into cache at key.
Cache
  
Remove item from cache at key.
Cache
Property detail
sizeproperty
size:int  [read-only]

Returns the size of the cache.

Implementation
    public function get size():int
Constructor detail
Cache()constructor
public function Cache(size:int)

Constructor.

Parameters
size:int
Method detail
contains()method
public function contains(key:*):Boolean

Returns true if cache has item at key and otherwise false

Parameters
key:*

Returns
Boolean
dispose()method 
public function dispose():void

Releases all resources this object holds on to. Do not use object after calling dispose.

get()method 
public function get(key:*):ICacheItem

Parameters
key:*

Returns
ICacheItem
put()method 
public function put(key:*, item:ICacheItem):void

Put item into cache at key.

Parameters
key:*
 
item:ICacheItem
remove()method 
public function remove(key:*):ICacheItem

Remove item from cache at key.

Parameters
key:*

Returns
ICacheItem