Skip to content

Instantly share code, notes, and snippets.

@coolov
coolov / http-cache-node.ts
Created June 15, 2021 21:42
http-cache-node.ts
import Database, { Statement, Options } from "better-sqlite3";
import { Request, Response } from "node-fetch";
interface Record {
url: string;
status: number;
statusText: string;
body: Buffer;
headers: string;
insertTime: number;