@next-boost/next-boost
Version:
Add a cache layer for next.js SSR pages. Use stale-while-revalidate to boost the performance.
9 lines (8 loc) • 337 B
TypeScript
/// <reference types="node" />
import { IncomingMessage, ServerResponse } from 'http';
export declare function serveMetrics(m: Metrics, res: ServerResponse): Promise<void>;
export declare function forMetrics(req: IncomingMessage): boolean;
export declare class Metrics {
data: Record<string, number>;
inc(key: string): number;
}