@@ -80,10 +80,10 @@ export class ISRHandler {
80
80
const { cacheKey, url, reqSimulator } = variantUrl ;
81
81
82
82
// check if the url is in cache
83
- const urlExists = await this . cache . has ( cachKey ) ;
83
+ const urlExists = await this . cache . has ( cacheKey ) ;
84
84
85
85
if ( ! urlExists ) {
86
- notInCache . push ( cachKey ) ;
86
+ notInCache . push ( cacheKey ) ;
87
87
continue ;
88
88
}
89
89
@@ -102,24 +102,24 @@ export class ISRHandler {
102
102
103
103
// if there are errors when rendering the site we throw an error
104
104
if ( errors ?. length && this . config . skipCachingOnHttpError ) {
105
- urlWithErrors [ cachKey ] = errors ;
105
+ urlWithErrors [ cacheKey ] = errors ;
106
106
}
107
107
108
108
// add the regenerated page to cache
109
109
const cacheConfig : CacheISRConfig = {
110
110
revalidate,
111
111
buildId : this . config . buildId ,
112
112
} ;
113
- await this . cache . add ( cachKey , html , cacheConfig ) ;
113
+ await this . cache . add ( cacheKey , html , cacheConfig ) ;
114
114
} catch ( err ) {
115
- urlWithErrors [ cachKey ] = err ;
115
+ urlWithErrors [ cacheKey ] = err ;
116
116
}
117
117
}
118
118
119
119
const invalidatedUrls = variantUrlsToInvalidate
120
- . map ( ( val ) => val . cachKey )
120
+ . map ( ( val ) => val . cacheKey )
121
121
. filter (
122
- ( cachKey ) => ! notInCache . includes ( cachKey ) && ! urlWithErrors [ cachKey ]
122
+ ( cacheKey ) => ! notInCache . includes ( cacheKey ) && ! urlWithErrors [ cacheKey ]
123
123
) ;
124
124
125
125
if ( notInCache . length ) {
@@ -156,11 +156,11 @@ export class ISRHandler {
156
156
const defaultVariant = ( req : Request ) => req ;
157
157
158
158
for ( const url of urlsToInvalidate ) {
159
- result . push ( { url, cachKey : url , reqSimulator : defaultVariant } ) ;
159
+ result . push ( { url, cacheKey : url , reqSimulator : defaultVariant } ) ;
160
160
for ( const variant of variants ) {
161
161
result . push ( {
162
162
url,
163
- cachKey : getCacheKey ( url , variant ) ,
163
+ cacheKey : getCacheKey ( url , variant ) ,
164
164
reqSimulator : variant . simulateVariant
165
165
? variant . simulateVariant
166
166
: defaultVariant ,
0 commit comments