summary refs log tree commit diff
diff options
context:
space:
mode:
authorMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2022-09-23 12:52:37 +1000
committerMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2022-09-23 12:52:37 +1000
commitea09ba535ee96fcf8e9f3a054999ddcfc4b852a0 (patch)
tree78876224a0488990e49a27e82d961c5487487251
parentAdd mysql sentry integration (diff)
downloadserver-ea09ba535ee96fcf8e9f3a054999ddcfc4b852a0.tar.xz
Typeorm redis cache
-rw-r--r--util/src/util/Database.ts7
1 files changed, 6 insertions, 1 deletions
diff --git a/util/src/util/Database.ts b/util/src/util/Database.ts

index 2973e114..83236b8d 100644 --- a/util/src/util/Database.ts +++ b/util/src/util/Database.ts
@@ -33,7 +33,12 @@ export function initDatabase(): Promise<Connection> { synchronize: type !== "mongodb", logging: false, cache: { - duration: 1000 * 3, // cache all find queries for 3 seconds + duration: 1000 * 30, + type: "redis", + options: { + host: "localhost", + port: 6379, + }, }, bigNumberStrings: false, supportBigNumbers: true,