Cache Parser

JSON →
library 1.2.6 ·javascript
verified May 27, 2026

Cache Parser is a minimal JavaScript/TypeScript library designed specifically for parsing and building the HTTP Cache-Control header. It provides the `parse()` function to convert a raw Cache-Control string into a structured object representing its directives (e.g., `maxAge`, `public`, `noCache`) and the `tokenize()` function to convert a directives object back into an array of tokens suitable for HTTP headers. The current stable version is 1.2.6. It is part of the `tinylibs` monorepo, suggesting a release cadence tied to other utilities within that project, with frequent patch updates as seen in recent changelogs. Its key differentiator lies in its focused, minimal approach to handling only the Cache-Control header, providing clear TSDoc comments for usage and strong type safety for TypeScript users. It targets both Node.js and browser environments, with ESM, CJS, and UMD distributions available.

total hits 21
actors 9 distinct systems
last hit 19h ago human
MetaBot
4
ByteDance
3
GPTBot
2
Script
1
ClaudeBot
1
Search engines
2
Humans
1

top countries 🇺🇸 United States · 🇩🇪 Germany · 🇸🇬 Singapore · 🇨🇦 Canada · 🇫🇷 France