Methods

This section describes the methods used to manipulate the application's view cache.

clear()

Removes all the viewInfo objects from the cache.

getView(key)

Obtains a viewInfo object from the cache by the specified key.

Parameters:
key: String
A key under which the requested viewInfo object is stored within the view cache.
Return Value: Object
A requested viewInfo object.

hasView(key)

Checks whether or not a viewInfo object is contained in the view cache under the specified key.

Parameters:
key: String
The key of the requested viewInfo object.
Return Value: Boolean
*true* if the requested viewInfo object is found in the view cache.

removeView(key)

Removes a viewInfo object from the cache by the specified key.

Parameters:
key: String
A key under which the viewInfo object to be removed is stored within the view cache.
Return Value: Object
The viewInfo object that has been removed.

This method fires the viewRemoved event after the viewInfo object has been removed.

setView(key, viewInfo)

Adds the specified viewInfo object to the cache under the specified key.

Parameters:
key: String
A key for the added viewInfo object.
viewInfo: Object
An object whose fields define information on the cached view.