cacheable-middleware

JSON →
library 1.0.0 ·javascript
verified May 27, 2026

Middleware for Express/Connect to set HTTP cache headers (Cache-Control, Expires) on responses. Version 1.0.0 (latest) requires Node >=6. Methods: res.cacheFor(milliseconds) or res.cacheFor(amount, unit) using Moment.js duration syntax. Can also set default cache duration for all routes in a middleware stack. Lightweight, no dependencies beyond Node built-ins. Differs from express-cache-headers by offering both per-response and global configuration.

total hits 22
actors 7 distinct systems
last hit 3d ago human
ByteDance
4
MetaBot
4
GPTBot
2
Script
1
Search engines
1
Humans
2

top countries 🇺🇸 United States · 🇩🇪 Germany · 🇸🇬 Singapore · 🇨🇦 Canada · 🇮🇹 Italy