10000 chore: clean up variable names · opennextjs/opennextjs-netlify@d96b20c · GitHub
[go: up one dir, main page]

Skip to content

Commit d96b20c

Browse files
committed
chore: clean up variable names
1 parent 0fd916d commit d96b20c

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/run/handlers/cache.cts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ export class NetlifyCacheHandler implements CacheHandlerForMultipleVersions {
230230
...args: Parameters<CacheHandlerForMultipleVersions['get']>
231231
): ReturnType<CacheHandlerForMultipleVersions['get']> {
232232
return this.tracer.withActiveSpan('get cache key', async (span) => {
233-
const [key, ctx = {}] = args
233+
const [key, context = {}] = args
234234
getLogger().debug(`[NetlifyCacheHandler.get]: ${key}`)
235235

236236
span.setAttributes({ key })
@@ -263,7 +263,7 @@ export class NetlifyCacheHandler implements CacheHandlerForMultipleVersions {
263263
return null
264264
}
265265

266-
const staleByTags = await this.checkCacheEntryStaleByTags(blob, ctx.tags, ctx.softTags)
266+
const staleByTags = await this.checkCacheEntryStaleByTags(blob, context.tags, context.softTags)
267267

268268
if (staleByTags) {
269269
span.addEvent('Stale', { staleByTags, key, ttl })
@@ -277,7 +277,7 @@ export class NetlifyCacheHandler implements CacheHandlerForMultipleVersions {
277277
case 'FETCH':
278278
span.addEvent('FETCH', {
279279
lastModified: blob.lastModified,
280-
revalidate: ctx.revalidate,
280+
revalidate: context.revalidate,
281281
ttl,
282282
})
283283
return {

src/run/revalidate.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ function isRevalidateMethod(
1515
}
1616

1717
// Needing to proxy the response object to intercept the revalidate call for on-demand revalidation on page routes
18-
export const nextResponseProxy = (res: ServerResponse, requestContext: RequestContext) => {
19-
return new Proxy(res, {
18+
export const nextResponseProxy = (response: ServerResponse, requestContext: RequestContext) => {
19+
return new Proxy(response, {
2020
get(target: ServerResponse, key: string) {
2121
const originalValue = Reflect.get(target, key)
2222
if (isRevalidateMethod(key, originalValue)) {

0 commit comments

Comments
 (0)
0