mirror of
https://github.com/docmost/docmost.git
synced 2026-05-07 06:23:06 +08:00
chore(server): add duckdb dependency and query-cache env getters
This commit is contained in:
@@ -37,6 +37,7 @@
|
||||
"@aws-sdk/lib-storage": "3.1014.0",
|
||||
"@aws-sdk/s3-request-presigner": "3.1014.0",
|
||||
"@clickhouse/client": "^1.18.2",
|
||||
"@duckdb/node-api": "1.5.2-r.1",
|
||||
"@fastify/cookie": "^11.0.2",
|
||||
"@fastify/multipart": "^9.4.0",
|
||||
"@fastify/static": "^9.0.0",
|
||||
|
||||
@@ -304,4 +304,32 @@ export class EnvironmentService {
|
||||
getClickHouseUrl(): string {
|
||||
return this.configService.get<string>('CLICKHOUSE_URL');
|
||||
}
|
||||
|
||||
getBaseQueryCacheEnabled(): boolean {
|
||||
return (
|
||||
this.configService.get<string>('BASE_QUERY_CACHE_ENABLED', 'false') ===
|
||||
'true'
|
||||
);
|
||||
}
|
||||
|
||||
getBaseQueryCacheMinRows(): number {
|
||||
return parseInt(
|
||||
this.configService.get<string>('BASE_QUERY_CACHE_MIN_ROWS', '25000'),
|
||||
10,
|
||||
);
|
||||
}
|
||||
|
||||
getBaseQueryCacheMaxCollections(): number {
|
||||
return parseInt(
|
||||
this.configService.get<string>('BASE_QUERY_CACHE_MAX_COLLECTIONS', '50'),
|
||||
10,
|
||||
);
|
||||
}
|
||||
|
||||
getBaseQueryCacheWarmTopN(): number {
|
||||
return parseInt(
|
||||
this.configService.get<string>('BASE_QUERY_CACHE_WARM_TOP_N', '50'),
|
||||
10,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user