diff options
author | Samuel <34555296+Flam3rboy@users.noreply.github.com> | 2023-03-17 19:47:23 +0100 |
---|---|---|
committer | Samuel <34555296+Flam3rboy@users.noreply.github.com> | 2023-03-17 19:47:23 +0100 |
commit | 2e473576cf765f5c5e83888056c889d0da43e7fc (patch) | |
tree | 5a26dd0e90a55f1b56bef5dee1d219ab8bb7b2d0 /src | |
parent | fix: request language property (diff) | |
download | server-2e473576cf765f5c5e83888056c889d0da43e7fc.tar.xz |
wip: cache
Diffstat (limited to 'src')
-rw-r--r-- | src/util/util/Cache.ts | 42 | ||||
-rw-r--r-- | src/util/util/Database.ts | 1 |
2 files changed, 42 insertions, 1 deletions
diff --git a/src/util/util/Cache.ts b/src/util/util/Cache.ts new file mode 100644 index 00000000..44839a65 --- /dev/null +++ b/src/util/util/Cache.ts @@ -0,0 +1,42 @@ +/* eslint-disable */ +import { DataSource, QueryRunner } from "typeorm"; +import { QueryResultCache } from "typeorm/cache/QueryResultCache"; +import { QueryResultCacheOptions } from "typeorm/cache/QueryResultCacheOptions"; + +export class CustomQueryResultCache implements QueryResultCache { + constructor(private dataSource: DataSource) {} + connect(): Promise<void> { + throw new Error("Method not implemented."); + } + disconnect(): Promise<void> { + throw new Error("Method not implemented."); + } + synchronize(queryRunner?: QueryRunner | undefined): Promise<void> { + throw new Error("Method not implemented."); + } + getFromCache( + options: QueryResultCacheOptions, + queryRunner?: QueryRunner | undefined, + ): Promise<QueryResultCacheOptions | undefined> { + throw new Error("Method not implemented."); + } + storeInCache( + options: QueryResultCacheOptions, + savedCache: QueryResultCacheOptions | undefined, + queryRunner?: QueryRunner | undefined, + ): Promise<void> { + throw new Error("Method not implemented."); + } + isExpired(savedCache: QueryResultCacheOptions): boolean { + throw new Error("Method not implemented."); + } + clear(queryRunner?: QueryRunner | undefined): Promise<void> { + throw new Error("Method not implemented."); + } + remove( + identifiers: string[], + queryRunner?: QueryRunner | undefined, + ): Promise<void> { + throw new Error("Method not implemented."); + } +} diff --git a/src/util/util/Database.ts b/src/util/util/Database.ts index e625ea9b..5c5c8b4c 100644 --- a/src/util/util/Database.ts +++ b/src/util/util/Database.ts @@ -63,7 +63,6 @@ const DataSourceOptions = new DataSource({ supportBigNumbers: true, name: "default", migrations: [path.join(__dirname, "..", "migration", DatabaseType, "*.js")], - cache: true, }); // Gets the existing database connection |