@@ -19,8 +19,8 @@ export default class Webpack4Cache {
1919 ) ;
2020 }
2121
22- async get ( task , sources ) {
23- const weakOutput = this . weakCache . get ( task . assetSource ) ;
22+ async get ( cacheData , sources ) {
23+ const weakOutput = this . weakCache . get ( cacheData . assetSource ) ;
2424
2525 if ( weakOutput ) {
2626 return weakOutput ;
@@ -32,12 +32,13 @@ export default class Webpack4Cache {
3232 }
3333
3434 // eslint-disable-next-line no-param-reassign
35- task . cacheIdent = task . cacheIdent || serialize ( task . cacheKeys ) ;
35+ cacheData . cacheIdent =
36+ cacheData . cacheIdent || serialize ( cacheData . cacheKeys ) ;
3637
3738 let cachedResult ;
3839
3940 try {
40- cachedResult = await cacache . get ( this . cache , task . cacheIdent ) ;
41+ cachedResult = await cacache . get ( this . cache , cacheData . cacheIdent ) ;
4142 } catch ( ignoreError ) {
4243 // eslint-disable-next-line no-undefined
4344 return undefined ;
@@ -63,17 +64,24 @@ export default class Webpack4Cache {
6364 return cachedResult ;
6465 }
6566
66- async store ( task ) {
67- if ( ! this . weakCache . has ( task . assetSource ) ) {
68- this . weakCache . set ( task . assetSource , task ) ;
67+ async store ( cacheData ) {
68+ if ( ! this . weakCache . has ( cacheData . assetSource ) ) {
69+ this . weakCache . set ( cacheData . assetSource , cacheData ) ;
6970 }
7071
7172 if ( ! this . cache ) {
7273 // eslint-disable-next-line no-undefined
7374 return undefined ;
7475 }
7576
76- const { cacheIdent, css, assetName, map, input, inputSourceMap } = task ;
77+ const {
78+ cacheIdent,
79+ css,
80+ assetName,
81+ map,
82+ input,
83+ inputSourceMap,
84+ } = cacheData ;
7785
7886 return cacache . put (
7987 this . cache ,
0 commit comments