perf(server): reduce db query
This commit is contained in:
parent
78736c70f7
commit
6f2e93c6a1
6 changed files with 30 additions and 17 deletions
6
packages/backend/src/server/activitypub/cache.ts
Normal file
6
packages/backend/src/server/activitypub/cache.ts
Normal 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);
|
||||
Loading…
Add table
Add a link
Reference in a new issue