{"library":"express-cache-ctrl","type":"library","category":null,"description":"Express middleware to manage the Cache-Control header for HTTP caching. Version 1.2.0 is the latest stable release. It provides simple functions like `public()`, `private()`, `disable()`, `secure()`, and `custom()` to set caching directives. Key differentiators include support for ms-formatted TTL strings (e.g., '1d', '2h'), OWASP-recommended secure caching presets, and fine-grained control via an options object. Compared to other caching middleware like `helmet` or `express-cache-headers`, it focuses solely on Cache-Control and is lightweight. Requires Node >= 18.20.8.","language":"javascript","status":"active","version":"1.2.0","tags":["javascript","express","cache","cache-control","http"],"last_verified":"Sun Jun 07","install":[{"cmd":"npm install express-cache-ctrl","imports":["const cache = require('express-cache-ctrl')","app.use('/api', cache.disable())","app.use('/static', cache.public('1d'))"]},{"cmd":"yarn add express-cache-ctrl","imports":[]},{"cmd":"pnpm add express-cache-ctrl","imports":[]}],"homepage":"https://github.com/clcastro87/express-cache-ctrl#readme","github":"https://github.com/clcastro87/express-cache-ctrl","docs":null,"changelog":null,"pypi":null,"npm":"express-cache-ctrl","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":null}