mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-07-14 09:52:45 +02:00
disable post cache on prod, dont set it if no pid
This commit is contained in:
@@ -24,7 +24,10 @@ module.exports = function(Posts) {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
}
|
||||
cache.set(data.postData.pid, data.postData.content);
|
||||
|
||||
if (global.env === 'production' && data.postData.pid) {
|
||||
cache.set(data.postData.pid, data.postData.content);
|
||||
}
|
||||
|
||||
callback(null, data.postData);
|
||||
});
|
||||
@@ -35,4 +38,4 @@ module.exports = function(Posts) {
|
||||
|
||||
plugins.fireHook('filter:parse.signature', {userData: userData, uid: uid}, callback);
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user