added support for deep route caching, settings cache, template optim

This commit is contained in:
Wyatt Johnson
2017-12-05 11:17:44 -07:00
parent 001beb7a5b
commit d7302e4b3c
19 changed files with 269 additions and 100 deletions
+51 -1
View File
@@ -108,10 +108,60 @@ CommentSchema.index({
background: false
});
CommentSchema.index({
'status': 1,
'created_at': 1,
}, {
background: true,
});
CommentSchema.index({
'status': 1,
'created_at': 1,
'asset_id': 1,
}, {
background: true,
});
// Add an index that is optimized for sorting based on the action count data.
CommentSchema.index({
'created_at': 1,
'action_counts': 1,
'action_counts.flag': 1,
}, {
background: true,
});
CommentSchema.index({
'created_at': 1,
'action_counts.flag': 1,
'status': 1,
}, {
background: true,
});
// Add an index that is optimized for finding flagged comments.
CommentSchema.index({
'asset_id': 1,
'created_at': 1,
'action_counts.flag': 1,
}, {
background: true,
});
// Add an index for the reply sort.
CommentSchema.index({
'asset_id': 1,
'created_at': -1,
'reply_count': -1,
}, {
background: true,
});
// Optimize for tag searches/counts.
CommentSchema.index({
'asset_id': 1,
'tags.tag.name': 1,
'status': 1,
}, {
background: true,
});