We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 44367ac commit 4b6043bCopy full SHA for 4b6043b
1 file changed
src/services/MysqlCache.ts
@@ -65,7 +65,7 @@ export class MysqlCache<Scheme> extends MysqlNative<Scheme> {
65
}
66
67
async getById(id: string, pick = this.columns, trx?: CoaMysql.Transaction, ms = this.ms, force = false) {
68
- const result = trx ? await super.getById(id, this.columns, trx) : await this.redisCache.warp(this.getCacheNsp('id'), id, async () => await super.getById(id, this.columns, trx), ms, force)
+ const result = trx?.__isSafeTransaction ? await super.getById(id, this.columns, trx) : await this.redisCache.warp(this.getCacheNsp('id'), id, async () => await super.getById(id, this.columns, trx), ms, force)
69
return this.pickResult(result, pick)
70
71
0 commit comments