123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- import { CacheableResponse, } from './CacheableResponse.js';
- import './_version.js';
- class CacheableResponsePlugin {
-
- constructor(config) {
-
- this.cacheWillUpdate = async ({ response }) => {
- if (this._cacheableResponse.isResponseCacheable(response)) {
- return response;
- }
- return null;
- };
- this._cacheableResponse = new CacheableResponse(config);
- }
- }
- export { CacheableResponsePlugin };
|