perf(server): reduce db query

This commit is contained in:
syuilo 2022-03-21 05:21:37 +09:00
parent 78736c70f7
commit 6f2e93c6a1
6 changed files with 30 additions and 17 deletions

View file

@ -0,0 +1,6 @@
import { Cache } from "@/misc/cache";
import { Note } from "@/models/entities/note";
import { User } from "@/models/entities/user";
export const userCache = new Cache<User | null>(1000 * 60 * 30);
export const noteCache = new Cache<Note | null>(1000 * 60 * 30);