mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-17 19:21:04 +01:00
cache categories:cid and cid:<cid>:children
these rarely change, no need to go to db for them
This commit is contained in:
@@ -56,7 +56,7 @@ module.exports = function (Categories) {
|
||||
|
||||
Categories.getAllCategoryFields = function (fields, callback) {
|
||||
async.waterfall([
|
||||
async.apply(db.getSortedSetRange, 'categories:cid', 0, -1),
|
||||
async.apply(Categories.getAllCidsFromSet, 'categories:cid'),
|
||||
function (cids, next) {
|
||||
Categories.getCategoriesFields(cids, fields, next);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user