问题描述:
express 默认缓存,这怎么破?
解决方案:
apiRoutes.use(function (req, res, next) {
res.setHeader('Cache-Control', 'no-cache, no-store, must-revalidate');
res.setHeader('Pragma', 'no-cache');
res.setHeader('Expires', '0');
next();
});
更多专业前端知识,请上 【猿2048】www.mk2048.com