deno.land / x / lume@v2.1.4 / middlewares / no_cache.ts
123456789101112131415import type { Middleware } from "../core/server.ts";
/** Add a header to prevent the browser cache */export default function noCache(): Middleware { return async (request, next) => { const response = await next(request); const { headers } = response; headers.set("cache-control", "no-cache no-store must-revalidate"); headers.delete("last-modified"); headers.delete("etag");
return response; };}
Version Info