Authored by 刘传洋

empty no-cache

... ... @@ -36,6 +36,11 @@ exports.index = (req, res, next) => {
guangModel.getRecoArticles(gender, 1, 10, channel),
headerModel.requestHeaderData(channel)
]).then(ret => {
if(_.isEmpty(ret[2]) || _.isEmpty(ret[2].msgs)) {
res.set('Cache-Control', 'no-cache');
}
res.render('guang/index', {
title: '逛' + (res.locals.title || ''),
guang: {
... ... @@ -88,6 +93,10 @@ exports.tags = (req, res, next) => {
headerModel.requestHeaderData(channel)
]).then(ret => {
if(_.isEmpty(ret[1]) || _.isEmpty(ret[1].msgs)) {
res.set('Cache-Control', 'no-cache');
}
res.render('guang/tag', {
title: query + (res.locals.title || ''),
guang: {
... ... @@ -138,6 +147,11 @@ exports.editor = (req, res, next) => {
guangModel.getRecoArticles(gender, 1, 10, channel),
headerModel.requestHeaderData(channel)
]).then(ret => {
if(_.isEmpty(ret[1]) || _.isEmpty(ret[1].msgs)) {
res.set('Cache-Control', 'no-cache');
}
res.render('guang/editor', {
title: _.get(ret[0], 'name', '') + (res.locals.title || ''),
guang: {
... ... @@ -236,6 +250,10 @@ exports.detail = (req, res, next) => {
Promise.all(promises).then(ret => {
if(_.isEmpty(ret[1])) {
res.set('Cache-Control', 'no-cache');
}
res.render('guang/detail', Object.assign({
module: 'guang',
page: 'detail',
... ...