From 6fa18fdc896cb0d050c5f281bb0ab26de628520b Mon Sep 17 00:00:00 2001 From: Madeline <46743919+MaddyUnderStars@users.noreply.github.com> Date: Sun, 25 Sep 2022 11:10:57 +1000 Subject: [PATCH] Typeorm doesn't even use the cache for BaseEntity.* methods --- util/src/util/Database.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/util/src/util/Database.ts b/util/src/util/Database.ts index 83236b8d..47d1987b 100644 --- a/util/src/util/Database.ts +++ b/util/src/util/Database.ts @@ -32,14 +32,14 @@ export function initDatabase(): Promise { entities: Object.values(Models).filter((x) => x?.constructor?.name !== "Object" && x?.name), synchronize: type !== "mongodb", logging: false, - cache: { - duration: 1000 * 30, - type: "redis", - options: { - host: "localhost", - port: 6379, - }, - }, + // cache: { // cache is used only by query builder and entity manager + // duration: 1000 * 30, + // type: "redis", + // options: { + // host: "localhost", + // port: 6379, + // }, + // }, bigNumberStrings: false, supportBigNumbers: true, name: "default",