Handles caching of service responses (after transforming). Uses passed closures to handle service requests - so remains independent of the source of information. Implements the info source for 'static' data read from a config file.
| Type | Name and description |
|---|---|
static java.lang.Object |
cache |
| Type Params | Return Type | Name and description |
|---|---|---|
|
java.lang.Object |
clear(java.lang.Object key) |
|
java.lang.Object |
clear() |
|
java.lang.Object |
get(java.lang.String key, groovy.lang.Closure source, int maxAgeInDays = 1)Returns the cached results for the specified key if available and fresh else calls the passed closure to get the results (and cache them). |
|
java.lang.Object |
isError(java.lang.Object results) |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Returns the cached results for the specified key if available and fresh else calls the passed closure to get the results (and cache them).
key - for cache storagesource - closure to retrieve the results if requiredmaxAgeInDays - the maximum age of the cached results