Class: cacheStrategies


Contains out of the box Cache Strategies which includes the HTTP Cache Header strategy. The cache strategy is applied to GET/HEAD requests by the defaultResponseProxy right after the fetch strategy is applied and the response is obtained. The cache strategy should be a function which takes the request and response as parameter and returns a Promise which resolves to the response. In the case the fetch strategy returns a server response. the cache strategy should determine whether the request/response should be cached and if so, persist the request/response by calling persistenceManager.getCache().put(). The cache strategy should also handle cached responses returned by the fetch strategy.


(static) getHttpCacheHeaderStrategy() → {function}

Returns the HTTP Cache Header strategy
Returns the HTTP Cache Header strategy which conforms to the Cache Strategy API.