File tree Expand file tree Collapse file tree
src/content/docs/ko/reference/modules Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -248,7 +248,7 @@ import type {
248248
249249<p >
250250
251- ** 타입:** ` {addCookieHeader?: boolean; clientAddress?: string; locals?: object; prerenderedErrorPageFetch?: (url: ErrorPagePath) => Promise<Response>; routeData?: RouteData;} `
251+ ** 타입:** ` {addCookieHeader?: boolean; clientAddress?: string; locals?: object; prerenderedErrorPageFetch?: (url: ErrorPagePath) => Promise<Response>; waitUntil?: (promise: Promise<unknown>) => void; routeData?: RouteData;} `
252252</p >
253253
254254라우트 렌더링을 제어하기 위한 옵션을 설명합니다.
@@ -346,6 +346,33 @@ return app.render(request, {
346346
347347제공되지 않으면 Astro는 에러 페이지를 가져오기 위해 기본 동작으로 돌아갑니다.
348348
349+ #### ` RenderOptions.waitUntil() `
350+
351+ <p >
352+
353+ ** 타입:** ` (promise: Promise<unknown>) => void ` <br />
354+ <Since v = " 6.2.0" />
355+ </p >
356+
357+ 응답이 전송된 이후 백그라운드 작업을 수행하기 위한 선택적 런타임 훅입니다.
358+
359+ 어댑터는 이를 전달하여 런타임 캐시 제공자가 응답 처리를 차단하지 않은 상태로 캐시 쓰기나 stale-while-revalidate 같은 작업을 예약할 수 있도록 할 수 있습니다.
360+
361+ 다음 예시는 [ 어댑터 서버 엔트리포인트] ( /ko/reference/adapter-reference/#서버-엔트리포인트-만들기 ) 에서 런타임의 ` waitUntil() ` 구현을 [ ` app.render() ` ] ( #apprender ) 에 전달합니다:
362+
363+ ``` js {8}
364+ import { createApp } from ' astro/app/entrypoint' ;
365+
366+ const app = createApp ();
367+
368+ export async function handler (event , context ) {
369+ // ...
370+ return app .render (event .request , {
371+ waitUntil: context .waitUntil .bind (context),
372+ });
373+ }
374+ ```
375+
349376#### ` RenderOptions.routeData `
350377
351378<p >
You can’t perform that action at this time.
0 commit comments