summaryrefslogtreecommitdiff
path: root/packages/backend/src/models/json-schema/note.ts
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2023-10-19 09:20:19 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2023-10-19 09:20:19 +0900
commit1671575d5d3d081c83f172f3439884010aafeb59 (patch)
tree662c64008c53d3290269ed5b69ceb8e773d60837 /packages/backend/src/models/json-schema/note.ts
parentperf(backend): improve my reaction population performance (diff)
downloadsharkey-1671575d5d3d081c83f172f3439884010aafeb59.tar.gz
sharkey-1671575d5d3d081c83f172f3439884010aafeb59.tar.bz2
sharkey-1671575d5d3d081c83f172f3439884010aafeb59.zip
perf(backend): ノートのリアクション情報をキャッシュすることでDBへのクエリを削減
Diffstat (limited to 'packages/backend/src/models/json-schema/note.ts')
-rw-r--r--packages/backend/src/models/json-schema/note.ts8
1 files changed, 8 insertions, 0 deletions
diff --git a/packages/backend/src/models/json-schema/note.ts b/packages/backend/src/models/json-schema/note.ts
index 2caf0d0c3d..38c0054b55 100644
--- a/packages/backend/src/models/json-schema/note.ts
+++ b/packages/backend/src/models/json-schema/note.ts
@@ -174,6 +174,14 @@ export const packedNoteSchema = {
type: 'string',
optional: true, nullable: false,
},
+ reactionAndUserPairCache: {
+ type: 'array',
+ optional: true, nullable: false,
+ items: {
+ type: 'string',
+ optional: false, nullable: false,
+ },
+ },
myReaction: {
type: 'object',