@@ -51,10 +51,10 @@ const awsFetch = (
5151} ;
5252
5353function buildDynamoKey ( key : string ) {
54- const { NEXT_BUILD_ID } = process . env ;
54+ const { OPEN_NEXT_BUILD_ID } = process . env ;
5555 // FIXME: We should probably use something else than path.join here
5656 // this could transform some fetch cache key into a valid path
57- return path . posix . join ( NEXT_BUILD_ID ?? "" , key ) ;
57+ return path . posix . join ( OPEN_NEXT_BUILD_ID ?? "" , key ) ;
5858}
5959
6060function buildDynamoObject (
@@ -81,7 +81,7 @@ const tagCache: TagCache = {
8181 if ( globalThis . openNextConfig . dangerous ?. disableTagCache ) {
8282 return [ ] ;
8383 }
84- const { CACHE_DYNAMO_TABLE , NEXT_BUILD_ID } = process . env ;
84+ const { CACHE_DYNAMO_TABLE , OPEN_NEXT_BUILD_ID } = process . env ;
8585 const store = globalThis . __openNextAls . getStore ( ) ;
8686 const cache = store ?. requestCache . getOrCreate < string , string [ ] > (
8787 "dynamoDb:getByPath" ,
@@ -113,7 +113,7 @@ const tagCache: TagCache = {
113113 debug ( "tags for path" , path , tags ) ;
114114 // We need to remove the buildId from the path
115115 const resultTags = tags . map ( ( tag : string ) =>
116- tag . replace ( `${ NEXT_BUILD_ID } /` , "" ) ,
116+ tag . replace ( `${ OPEN_NEXT_BUILD_ID } /` , "" ) ,
117117 ) ;
118118 cache ?. set ( path , resultTags ) ;
119119 return resultTags ;
@@ -127,7 +127,7 @@ const tagCache: TagCache = {
127127 if ( globalThis . openNextConfig . dangerous ?. disableTagCache ) {
128128 return [ ] ;
129129 }
130- const { CACHE_DYNAMO_TABLE , NEXT_BUILD_ID } = process . env ;
130+ const { CACHE_DYNAMO_TABLE , OPEN_NEXT_BUILD_ID } = process . env ;
131131 const store = globalThis . __openNextAls . getStore ( ) ;
132132 const cache = store ?. requestCache . getOrCreate < string , string [ ] > (
133133 "dynamoDb:getByTag" ,
@@ -155,7 +155,7 @@ const tagCache: TagCache = {
155155 const paths =
156156 Items ?. map (
157157 ( { path : { S : key } } : any ) =>
158- key ?. replace ( `${ NEXT_BUILD_ID } /` , "" ) ?? "" ,
158+ key ?. replace ( `${ OPEN_NEXT_BUILD_ID } /` , "" ) ?? "" ,
159159 ) ?? [ ] ;
160160 cache ?. set ( tag , paths ) ;
161161 return paths ;
0 commit comments