diff --git a/src/routes/api.js b/src/routes/api.js index 0115249d75..5f7ef811cd 100644 --- a/src/routes/api.js +++ b/src/routes/api.js @@ -137,11 +137,9 @@ function getModerators(req, res, next) { var templatsListingCache = []; function getTemplatesListing(req, res, next) { - var st = process.hrtime(); - //if (templatsListingCache.length) { - // process.profile('with cache', st); -// return res.json(templatsListingCache); -// } + if (templatsListingCache.length) { + return res.json(templatsListingCache); + } async.parallel({ views: function(next) { @@ -163,7 +161,6 @@ function getTemplatesListing(req, res, next) { data = data.concat(results.extended); templatsListingCache = data; - process.profile('without cache', st); res.json(data); }); }