{"library":"cdn-cache-control","type":"library","category":null,"description":"A subclass of the fetch Headers class that simplifies setting Cache-Control and CDN-specific cache headers for modern CDNs. Version 1.3.1 supports Netlify, Vercel, Cloudflare, and Akamai with automatic platform detection. It provides a chainable API with sensible defaults (CDN cache for 1 year, browser revalidation) and methods like `ttl()`, `swr()`, and `immutable()`. Unlike raw header manipulation, it abstracts CDN-specific quirks and promotes best practices like stale-while-revalidate and surrogate keys. Ships TypeScript types. Released as an npm package and JSR module.","language":"javascript","status":"active","version":"1.3.1","tags":["javascript","typescript"],"last_verified":"Sun Jun 07","install":[{"cmd":"npm install cdn-cache-control","imports":["import { CacheHeaders } from 'cdn-cache-control'","import { CacheHeaders } from 'jsr:@ascorbic/cdn-cache-control'","import { ONE_HOUR } from 'cdn-cache-control'","import type { CacheHeaders } from 'cdn-cache-control'"]},{"cmd":"yarn add cdn-cache-control","imports":[]},{"cmd":"pnpm add cdn-cache-control","imports":[]}],"homepage":"https://github.com/ascorbic/cdn-cache-control","github":"https://github.com/ascorbic/cdn-cache-control","docs":null,"changelog":null,"pypi":null,"npm":"cdn-cache-control","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":null}