8000 chore: run format:fix · opennextjs/opennextjs-netlify@cf47c74 · GitHub
[go: up one dir, main page]

Skip to content

Commit cf47c74

Browse files
committed
chore: run format:fix
1 parent ca7ca4e commit cf47c74

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

src/run/handlers/cache.cts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,11 @@ export class NetlifyCacheHandler implements CacheHandlerForMultipleVersions {
263263
return null
264264
}
265265

266-
const staleByTags = await this.checkCacheEntryStaleByTags(blob, context.tags, context.softTags)
266+
const staleByTags = await this.checkCacheEntryStaleByTags(
267+
blob,
268+
context.tags,
269+
context.softTags,
270+
)
267271

268272
if (staleByTags) {
269273
span.addEvent('Stale', { staleByTags, key, ttl })

src/run/headers.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -274,10 +274,7 @@ export const setCacheControlHeaders = (
274274
}
275275
}
276276

277-
export const setCacheTagsHeaders = (
278-
headers: Headers,
279-
requestContext: RequestContext,
280-
) => {
277+
export const setCacheTagsHeaders = (headers: Headers, requestContext: RequestContext) => {
281278
if (!headers.has('cache-control') && !headers.has('netlify-cdn-cache-control')) {
282279
return
283280
}

tests/e2e/dynamic-cms.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ test.describe('Dynamic CMS', () => {
1414
)
1515
expect(headers1['netlify-cache-tag']).toEqual('_n_t_/content/blog')
1616
expect(headers1['netlify-cdn-cache-control']).toMatch(
17-
/s-maxage=31536000,( stale-while-revalidate=3153600< 8000 /span>0,)? durable/
17+
/s-maxage=31536000,( stale-while-revalidate=31536000,)? durable/,
1818
)
1919

2020
// 2. Publish the blob, revalidate the dynamic page, and wait to regenerate
@@ -33,7 +33,7 @@ test.describe('Dynamic CMS', () => {
3333
)
3434
expect(headers2['netlify-cache-tag']).toEqual('_n_t_/content/blog')
3535
expect(headers2['netlify-cdn-cache-control']).toMatch(
36-
/s-maxage=31536000,( stale-while-revalidate=31536000,)? durable/
36+
/s-maxage=31536000,( stale-while-revalidate=31536000,)? durable/,
3737
)
3838

3939
// 4. Unpublish the blob, revalidate the dynamic page, and wait to regenerate
@@ -52,7 +52,7 @@ test.describe('Dynamic CMS', () => {
5252
)
5353
expect(headers3['netlify-cache-tag']).toEqual('_n_t_/content/blog')
5454
expect(headers3['netlify-cdn-cache-control']).toMatch(
55-
/s-maxage=31536000,( stale-while-revalidate=31536000,)? durable/
55+
/s-maxage=31536000,( stale-while-revalidate=31536000,)? durable/,
5656
)
5757
})
5858
})

0 commit comments

Comments
 (0)
0