@trieb.work/nextjs-turbo-redis-cache
Version:
Designed for speed, scalability, and optimized performance, nextjs-turbo-redis-cache is your custom cache handler for demanding production environments.
19 lines (15 loc) • 316 B
text/typescript
import { NextResponse } from 'next/server';
let counter = 0;
export const dynamic = 'force-static';
export const revalidate = false;
export async function GET() {
counter++;
return NextResponse.json(
{ counter },
{
headers: {
'Cache-Control': 'public, max-age=1',
},
},
);
}