mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 11:35:55 +01:00
add cache hits/misses to posts cache
This commit is contained in:
@@ -27,8 +27,10 @@ module.exports = function (Posts) {
|
||||
|
||||
if (postData.pid && cache.has(String(postData.pid))) {
|
||||
postData.content = cache.get(String(postData.pid));
|
||||
cache.hits += 1;
|
||||
return callback(null, postData);
|
||||
}
|
||||
cache.misses += 1;
|
||||
|
||||
async.waterfall([
|
||||
function (next) {
|
||||
|
||||
Reference in New Issue
Block a user