Skip to content

Commit aeeb8f8

Browse files
committed
fix(cache): normalize empty cache table name before fallback
1 parent 41d2366 commit aeeb8f8

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎src/cache/DbQueryResultCache.ts‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ export class DbQueryResultCache implements QueryResultCache {
3232
typeof this.dataSource.options.cache === "object"
3333
? this.dataSource.options.cache
3434
: {}
35-
const cacheTableName = cacheOptions.tableName ?? "query-result-cache"
35+
const tableName =
36+
cacheOptions.tableName === "" ? undefined : cacheOptions.tableName
37+
const cacheTableName = tableName ?? "query-result-cache"
3638

3739
this.queryResultCacheDatabase = database
3840
this.queryResultCacheSchema = schema

0 commit comments

Comments
 (0)