From 8a3dd9eb0f017cecb1fe85c8bae5252ce3a818c2 Mon Sep 17 00:00:00 2001 From: nick-funk Date: Tue, 28 Mar 2023 14:58:48 -0600 Subject: [PATCH] describe Redis cache index for `archivedCommentActions` --- INDEXES.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/INDEXES.md b/INDEXES.md index 80814e567f..564e05c52b 100644 --- a/INDEXES.md +++ b/INDEXES.md @@ -6,6 +6,15 @@ The goal of this document is to date-mark the indexes you add to support the cha If you are releasing, you can use this readme to check all the indexes prior to the release you are deploying and have a good idea of what indexes you might need to deploy to Mongo along with your release of a new Coral Docker image to kubernetes. +## 2023-03-28 + +``` +db.archivedCommentActions.createIndex({ tenantID: 1, storyID: 1 }); +``` + +- This is used to speed up when the redis cache asks for the `archivedCommentActions` associated with a specific story. + - This is common when an archived story is loaded into the redis cache. + ## 2022-03-07 ``` @@ -47,7 +56,7 @@ db.sites.createIndex({ tenantID: 1, "$**": "text", createdAt: -1 }); #### uniqueness constraint indexes: ``` -db.commentActions.createIndex({ _id: 1 }); +db.commentActions.createIndex({ _id: 1 }); db.commentActions.createIndex({ tenantID: 1, id: 1 }); ```