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

Typeorm doesn't even use the cache for BaseEntity.* methods

This commit is contained in:
Madeline 2022-09-25 11:10:57 +10:00
parent 1f4f6c555f
commit e67f261f9a
No known key found for this signature in database
GPG Key ID: 80D25DA3BCB24281

View File

@ -32,14 +32,14 @@ export function initDatabase(): Promise<Connection> {
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",