mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-03 14:20:33 +01:00
fixed LRU cache problem
This commit is contained in:
@@ -9,9 +9,8 @@ module.exports = function(Posts) {
|
||||
Posts.parsePost = function(postData, callback) {
|
||||
postData.content = postData.content || '';
|
||||
|
||||
var cachedContent = cache.get(postData.pid);
|
||||
if (cachedContent) {
|
||||
postData.content = cachedContent;
|
||||
if (postData.pid && cache.has(postData.pid)) {
|
||||
postData.content = cache.get(postData.pid);
|
||||
return callback(null, postData);
|
||||
}
|
||||
|
||||
@@ -38,4 +37,4 @@ module.exports = function(Posts) {
|
||||
|
||||
plugins.fireHook('filter:parse.signature', {userData: userData, uid: uid}, callback);
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user