@@ -68,7 +68,9 @@ function buildDynamoObject(path: string, tags: string, revalidatedAt?: number) {
68
68
const tagCache : TagCache = {
69
69
async getByPath ( path ) {
70
70
try {
71
- if ( globalThis . disableDynamoDBCache ) return [ ] ;
71
+ if ( globalThis . openNextConfig . dangerous ?. disableTagCache ) {
72
+ return [ ] ;
73
+ }
72
74
const { CACHE_DYNAMO_TABLE , NEXT_BUILD_ID } = process . env ;
73
75
const result = await awsFetch (
74
76
JSON . stringify ( {
@@ -101,7 +103,9 @@ const tagCache: TagCache = {
101
103
} ,
102
104
async getByTag ( tag ) {
103
105
try {
104
- if ( globalThis . disableDynamoDBCache ) return [ ] ;
106
+ if ( globalThis . openNextConfig . dangerous ?. disableTagCache ) {
107
+ return [ ] ;
108
+ }
105
109
const { CACHE_DYNAMO_TABLE , NEXT_BUILD_ID } = process . env ;
106
110
const result = await awsFetch (
107
111
JSON . stringify ( {
@@ -133,7 +137,9 @@ const tagCache: TagCache = {
133
137
} ,
134
138
async getLastModified ( key , lastModified ) {
135
139
try {
136
- if ( globalThis . disableDynamoDBCache ) return lastModified ?? Date . now ( ) ;
140
+ if ( globalThis . openNextConfig . dangerous ?. disableTagCache ) {
141
+ return lastModified ?? Date . now ( ) ;
142
+ }
137
143
const { CACHE_DYNAMO_TABLE } = process . env ;
138
144
const result = await awsFetch (
139
145
JSON . stringify ( {
@@ -168,7 +174,9 @@ const tagCache: TagCache = {
168
174
async writeTags ( tags ) {
169
175
try {
170
176
const { CACHE_DYNAMO_TABLE } = process . env ;
171
- if ( globalThis . disableDynamoDBCache ) return ;
177
+ if ( globalThis . openNextConfig . dangerous ?. disableTagCache ) {
178
+ return ;
179
+ }
172
180
const dataChunks = chunk ( tags , MAX_DYNAMO_BATCH_WRITE_ITEM_COUNT ) . map (
173
181
( Items ) => ( {
174
182
RequestItems : {
0 commit comments