fixed LRU cache problem

v1.18.x
Julian Lam 9 years ago
parent c3560f677c
commit bbc42a937e

@ -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);
};
};
};

Loading…
Cancel
Save