@@ -19,8 +19,8 @@ export default class Webpack4Cache {
19
19
) ;
20
20
}
21
21
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 ) ;
24
24
25
25
if ( weakOutput ) {
26
26
return weakOutput ;
@@ -32,12 +32,13 @@ export default class Webpack4Cache {
32
32
}
33
33
34
34
// eslint-disable-next-line no-param-reassign
35
- task . cacheIdent = task . cacheIdent || serialize ( task . cacheKeys ) ;
35
+ cacheData . cacheIdent =
36
+ cacheData . cacheIdent || serialize ( cacheData . cacheKeys ) ;
36
37
37
38
let cachedResult ;
38
39
39
40
try {
40
- cachedResult = await cacache . get ( this . cache , task . cacheIdent ) ;
41
+ cachedResult = await cacache . get ( this . cache , cacheData . cacheIdent ) ;
41
42
} catch ( ignoreError ) {
42
43
// eslint-disable-next-line no-undefined
43
44
return undefined ;
@@ -63,17 +64,24 @@ export default class Webpack4Cache {
63
64
return cachedResult ;
64
65
}
65
66
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 ) ;
69
70
}
70
71
71
72
if ( ! this . cache ) {
72
73
// eslint-disable-next-line no-undefined
73
74
return undefined ;
74
75
}
75
76
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 ;
77
85
78
86
return cacache . put (
79
87
this . cache ,
0 commit comments