1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-11-22 10:22:39 +01:00

Typeorm redis cache

This commit is contained in:
Madeline 2022-09-23 12:52:37 +10:00
parent b1933bb1ce
commit ea09ba535e

View File

@ -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,