問題描述:
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