File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -345,6 +345,12 @@ export class NetlifyCacheHandler implements CacheHandlerForMultipleVersions {
345345 if ( requestContext ?. didPagesRouterOnDemandRevalidate ) {
346346 // encode here to deal with non ASCII characters in the key
347347 const tag = `_N_T_${ key === '/index' ? '/' : encodeURI ( key ) } `
348+ const tags = tag . split ( / , | % 2 c / gi)
349+
350+ if ( tags . length === 0 ) {
351+ return
352+ }
353+
348354 getLogger ( ) . debug ( `Purging CDN cache for: [${ tag } ]` )
349355 requestContext . trackBackgroundWork (
350356 purgeCache ( { tags : tag . split ( / , | % 2 c / gi) } ) . catch ( ( error ) => {
@@ -379,6 +385,10 @@ export class NetlifyCacheHandler implements CacheHandlerForMultipleVersions {
379385 tag . split ( / , | % 2 c / gi) ,
380386 )
381387
388+ if ( tags . length === 0 ) {
389+ return
390+ }
391+
382392 const data : TagManifest = {
383393 revalidatedAt : Date . now ( ) ,
384394 }
You can’t perform that action at this time.
0 commit comments