UNPKG

@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.

18 lines (14 loc) 273 B
import { NextResponse } from 'next/server'; let counter = 0; export const revalidate = 5; export async function GET() { counter++; return NextResponse.json( { counter }, { headers: { 'Cache-Control': 'public, max-age=1', }, }, ); }