File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -153,13 +153,14 @@ export class MysqlCache<Scheme> extends MysqlNative<Scheme> {
153153 }
154154
155155 async deleteCache ( ids : string [ ] , dataList : Array < CoaMysql . SafePartial < Scheme > > , trx ?: CoaMysql . Transaction ) {
156+ const deleteIds = [ ] as CoaRedis . CacheDelete [ ]
156157 if ( ( trx as any ) ?. __isSafeTransaction ) {
157158 ( trx as any ) ?. clearCacheNsps . push ( [ this . getCacheNsp ( 'id' ) , ids ] ) ;
158159 ( trx as any ) ?. clearCacheNsps . push ( [ this . getCacheNsp ( 'data' ) , [ ] ] )
160+ } else {
161+ deleteIds . push ( [ this . getCacheNsp ( 'id' ) , ids ] )
162+ deleteIds . push ( [ this . getCacheNsp ( 'data' ) , [ ] ] )
159163 }
160- const deleteIds = [ ] as CoaRedis . CacheDelete [ ]
161- deleteIds . push ( [ this . getCacheNsp ( 'id' ) , ids ] )
162- deleteIds . push ( [ this . getCacheNsp ( 'data' ) , [ ] ] )
163164 _ . forEach ( this . caches , ( items , name ) => {
164165 // name可能为index,count,或自定义
165166 items . forEach ( item => {
You can’t perform that action at this time.
0 commit comments