Methods
-
(static) getCacheFirstStrategy(options) → {Function}
-
Returns the Cache First fetch strategy
Parameters:
Name Type Argument Description options
{serverResponseCallback: function()} <optional>
Options - options.serverResponseCallback The callback which will be called when the server responds. The callback should return a Promise which resolves when complete.
- options.backgroundFetch Whether to do background fetching to the server when online. 'disabled' will disable background fetching, 'enabled' will enable it. The default is 'enabled'.
Returns:
Returns the Cache First fetch strategy which conforms to the Fetch Strategy API.- Type
- function
-
(static) getCacheIfOfflineStrategy() → {Function}
-
Returns the Cache If Offline Fetch Strategy
Returns:
Returns the Cache If Offline fetch strategy which conforms to the Fetch Strategy API.- Type
- function