Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@anthro.id/express-cache-control

anthro-id265MIT1.0.3TypeScript support: included

Apply a cache control header through Express middleware.

express, max-age, maxage, cache, cache-control, no-cache

readme

express-cache-controller

An updated version of Mousius/express-cache-controller.

Differences

  • Supports TypeScript types.
  • Supports immutable option.

Examples

app.use(cacheControl({ public: true }));

// If you want to modify the cache control header on-the-fly
app.use((req, res, next) => {
  res.cacheControl.immutable = true;
})

For more information about the API, please visit the origin of the module.

License

MIT