Buckets:
| import { NextRequest, NextResponse } from 'next/server' | |
| import { revalidatePath } from 'next/cache' | |
| export const revalidate = 1 | |
| export async function GET(req: NextRequest) { | |
| const path = req.nextUrl.searchParams.get('path') || '/' | |
| try { | |
| console.log('revalidating path', path) | |
| revalidatePath(path) | |
| return NextResponse.json({ revalidated: true, now: Date.now() }) | |
| } catch (err) { | |
| console.error('Failed to revalidate', path, err) | |
| return NextResponse.json({ revalidated: false, now: Date.now() }) | |
| } | |
| } | |
Xet Storage Details
- Size:
- 527 Bytes
- Xet hash:
- 58c3d0eb6f9df380bbda05d386d41a9a82eaf115b72abbdcde1d92165d2581fc
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.