diff options
author | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2022-09-23 12:52:37 +1000 |
---|---|---|
committer | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2022-09-23 12:52:37 +1000 |
commit | 034c2fb279b5a429af94dc56a3fb2458198f9889 (patch) | |
tree | 3fbe0edd4cdb3a057cdc92e16d5a4ad8ea83db51 | |
parent | Add mysql sentry integration (diff) | |
download | server-034c2fb279b5a429af94dc56a3fb2458198f9889.tar.xz |
Typeorm redis cache
-rw-r--r-- | util/src/util/Database.ts | 7 |
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, |