nocache2.1.0 • Public • Published
Middleware to turn off caching
const nocache =app
This sets four headers, disabling a lot of browser caching:
Cache-Control: no-store, no-cache, must-revalidate, proxy-revalidate
Caching has performance benefits, and you lose them here. It's also possible that you'll introduce new bugs and you'll wish people had old resources cached, but that's less likely.