DataSourceCacheExtension Class
+ + + + +
+
+
+
+
+DataSourceCache extension binds Cache to DataSource.
+
+
+
+ -
+
- Index + + +
- Methods + + +
- Properties + + + +
+
+
+
+
+
+ Item Index
+ + +
+
+
+
+
+
+
+
+
+
+
+ Methods
+ +-
+
+
- + _beforeDefRequestFn + + + + + +
- + _beforeDefResponseFn + + + + + +
- + initializer + + + + + +
+
+
+
+
+ Methods
+ + +
+
+
+
+
+
+
+ _beforeDefRequestFn
+
+
+
+ (
+
+
+
+
+
+
+
+ protected
+
+
+
+
+
+
+
+
+
+
+
+
+ -
+
+
-
+
+
e+ +
+
+
+
+
+
+ First look for cached response, then send request to live data.
+
+
+
+
+
+
+
+Parameters:
+ +-
+
+
-
+
+
e+ Event.Facade + + + + +++ + +Event Facade with the following properties:
+ +-
+
- tId (Number)
- Unique transaction ID. +
- request (Object)
- The request. +
- callback (Object)
- The callback object. +
- cfg (Object)
- Configuration object. +
+
+
+
+
+
+
+
+
+ _beforeDefResponseFn
+
+
+
+ (
+
+
+
+
+
+
+
+ protected
+
+
+
+
+
+
+
+
+
+
+
+
+ -
+
+
-
+
+
e+ +
+
+
+
+
+
+ Adds data to cache before returning data.
+
+
+
+
+
+
+
+Parameters:
+ +-
+
+
-
+
+
e+ Event.Facade + + + + +++ + +Event Facade with the following properties:
+ +-
+
- tId (Number)
- Unique transaction ID. +
- request (Object)
- The request. +
- callback (Object)
- The callback object with the following properties:
+
-
+
- success (Function)
- Success handler. +
- failure (Function)
- Failure handler. +
+ - data (Object)
- Raw data. +
- response (Object)
- Normalized response object with the following properties:
+
-
+
- cached (Object)
- True when response is cached. +
- results (Object)
- Parsed results. +
- meta (Object)
- Parsed meta data. +
- error (Object)
- Error object. +
+ - cfg (Object)
- Configuration object. +
+
+
+
+
+
+
+
+
+ initializer
+
+
+
+ (
+
+
+
+
+
+
+
+ private
+
+
+
+
+
+
+
+
+
+
+
+
+ -
+
+
-
+
+
config+ +
+
+
+
+
+
+ Internal init() handler.
+
+
+
+
+
+
+
+Parameters:
+ +-
+
+
-
+
+
config+ Object + + + + +++ + +Config object.
+
+
+
+
+
+
+
+
+
+ Properties
+ + + + + +
+
+ String
+
+
+
+
+
+
+ final
+
+
+
+ static
+
+
+
+
+
+
+
+ NS
+ String
+
+
+
+
+
+
+ final
+
+
+
+ static
+
+
+
+
+
+
+
+
+
+
+
+
+The namespace for the plugin. This will be the property on the host which +references the plugin instance.
+