File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
packages/fern-docs/bundle/src/app/[host]/[domain]/api/fern-docs/revalidate Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ import { getEnv, waitUntil } from "@vercel/functions";
2929import { kv } from "@vercel/kv" ;
3030import { mapValues } from "es-toolkit/object" ;
3131import { escapeRegExp } from "es-toolkit/string" ;
32- import { revalidatePath , revalidateTag } from "next/cache" ;
32+ import { invalidateByTag } from '@vercel/functions' ;
3333import { type NextRequest , NextResponse } from "next/server" ;
3434import { UnreachableCaseError } from "ts-essentials" ;
3535import { getFaiClient } from "@/getFaiClient" ;
@@ -63,10 +63,7 @@ export async function GET(
6363 const start = performance . now ( ) ;
6464
6565 const { host, domain } = await props . params ;
66- revalidateTag ( domain ) ;
67-
68- // delay to ensure invalidation propagates before cache is accessed
69- await new Promise ( ( resolve ) => setTimeout ( resolve , 500 ) ) ;
66+ await invalidateByTag ( domain ) ;
7067
7168 const stream = new ReadableStream ( {
7269 async start ( controller ) {
You can’t perform that action at this time.
0 commit comments