cacheable-request 5.1.0 → 5.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -117,7 +117,9 @@ Returns an event emitter.
117
117
 
118
118
  Type: `object`, `string`
119
119
 
120
- Any of the default request functions options plus:
120
+ - Any of the default request functions options.
121
+ - Any [`http-cache-semantics`](https://github.com/kornelski/http-cache-semantics#constructor-options) options.
122
+ - Any of the following:
121
123
 
122
124
  ###### opts.cache
123
125
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cacheable-request",
3
- "version": "5.1.0",
3
+ "version": "5.2.0",
4
4
  "description": "Wrap native HTTP requests with RFC compliant cache support",
5
5
  "license": "MIT",
6
6
  "repository": "lukechilds/cacheable-request",
package/src/index.js CHANGED
@@ -79,7 +79,7 @@ class CacheableRequest {
79
79
  }
80
80
 
81
81
  if (!response.fromCache) {
82
- response.cachePolicy = new CachePolicy(opts, response);
82
+ response.cachePolicy = new CachePolicy(opts, response, opts);
83
83
  response.fromCache = false;
84
84
  }
85
85