Q.Cache Class
Q.Cache constructor
Constructor
Methods
each
(
-
args
-
callback
Cycles through all the entries in the cache
get
(
Mixed
-
key
-
options
Accesses the cache and gets an entry from it
Parameters:
Returns:
Mixed:
whatever is stored there, or else returns undefined
key
(
String
static
-
args
-
functions
Generates the key under which things will be stored in a cache
Parameters:
Returns:
process
(
Mixed
static
-
name
-
options
Returns:
Mixed:
remove
(
Boolean
-
key
Accesses the cache and removes an entry from it.
Parameters:
-
key
Stringthe key of the entry to remove
Returns:
Boolean:
whether there was an existing entry under that key
set
(
Boolean
-
key
-
cbpos
-
subject
-
params
-
options
Accesses the cache and sets an entry in it
Parameters:
-
key
Stringthe key to save the entry under, or an array of arguments
-
cbpos
Numberthe position of the callback
-
subject
ObjectThe "this" object for the callback
-
params
ArrayThe parameters for the callback
-
options
Objectsupports the following options:
-
[dontTouch=false]
Boolean optionalif true, then doesn't mark item as most recently used
-
Returns:
Boolean:
whether there was an existing entry under that key