import { processCacheControlHeaders } from "https://deno.land/x/fathym_common@v0.2.166/src/common/http/processCacheControlHeaders.ts";
Processes cache control headers on a response.
Examples
From direct import
From direct import
import { processCacheControlHeaders } from "@fathym/common/http";
const resp = processCacheControlHeaders(response, {
'text\\/css': `public, max-age=${60 * 60 * 24 * 365}, immutable`
});
From common import
From common import
import { processCacheControlHeaders } from "@fathym/common";
const resp = processCacheControlHeaders(response, {
'text\\/css': `public, max-age=${60 * 60 * 24 * 365}, immutable`
});
Parameters
resp: Response
The response to process.
An optional object with cache control headers. The keys are regular expressions to match content types, and the value is used as the cache control header value.