Connect/Express middleware for browser cache optimization via asset fingerprinting and concatenation. Current version 0.0.17 (unmaintained). Provides `cachify.setup` middleware and view helpers (`cachify_js`, `cachify_css`) that rewrite asset URLs to include a content hash, allowing far-future Expires headers and transparent fallback to individual scripts in development. Unlike connect-assets, it focuses solely on HTTP caching headers and URL rewriting without compilation. No release cadence; last published in 2013. Node.js >=0.4.7 required.
npm install connect-cachifyNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows Express app with cachify middleware, asset map, and view helper injection.
Migrate to express-cachebuster or custom middleware with `etag` and `last-modified` handling.
Ensure `app.use(cachify.setup(...))` is called before `app.use(express.static(...))`.
Use middleware: `app.use(function(req, res, next) { res.locals.cachify_js = req.cachify_js; res.locals.cachify_css = req.cachify_css; next(); });`Set `root` option and use relative paths in assets map instead of `url_to_paths`.
Run `npm install connect-cachify` and ensure it's in your `package.json` dependencies.
Use `const cachify = require('connect-cachify');` and then `cachify.setup(...)`.Ensure `app.use(cachify.setup(...))` is called before any route that renders templates, and that `res.locals.cachify_js` is set.