check pid before setting cache

v1.18.x
barisusakli 9 years ago
parent 1c71001e1d
commit 9f48d3e6d2

@ -25,7 +25,7 @@ module.exports = function(Posts) {
return callback(err); return callback(err);
} }
if (global.env === 'production') { if (global.env === 'production' && data.postData.pid) {
cache.set(data.postData.pid, data.postData.content); cache.set(data.postData.pid, data.postData.content);
} }

Loading…
Cancel
Save