-
clear(key)
-
clear cache entries prefix matching given key
Parameters:
Name |
Type |
Argument |
Description |
key |
String
|
<optional>
|
Key prefix of cache entry to clear |
- Source:
-
-
retrive cache entry, or create if not exists.
Parameters:
Name |
Type |
Argument |
Description |
key |
String
|
<optional>
|
Key of cache entry |
- Source:
Returns:
-
Type
-
CacheEntry
-
<protected> makeCacheable(fn, scope, options) → {function}
-
Enable caching for async call fn to lookup the response cache first, then invoke original if no cached value.
Parameters:
Name |
Type |
Argument |
Description |
fn |
function
|
|
Function to covert cacheable |
scope |
Object
|
<optional>
|
Scope of function call |
options |
Object
|
<optional>
|
Options |
- Source:
Returns:
- Cached version of function
-
Type
-
function
-
<protected> makeResponseCacheable(fn, scope, options) → {function}
-
Enable caching for async call fn to intercept the response and store it to cache.
The original async calll fn is always invoked.
Parameters:
Name |
Type |
Argument |
Description |
fn |
function
|
|
Function to covert cacheable |
scope |
Object
|
<optional>
|
Scope of function call |
options |
Object
|
<optional>
|
Options |
- Source:
Returns:
- Cached version of function
-
Type
-
function