将cache中的回调放在syncRecord之前执行,可能有影响
This commit is contained in:
parent
aaccbda3bc
commit
83cf73b5bc
|
|
@ -81,11 +81,11 @@ export class Cache extends Feature {
|
|||
try {
|
||||
this.refreshing++;
|
||||
const { result, opRecords, message } = await this.aspectWrapper.exec(name, params);
|
||||
callback && callback(result, opRecords);
|
||||
if (opRecords) {
|
||||
this.syncInner(opRecords);
|
||||
}
|
||||
this.refreshing--;
|
||||
callback && callback(result, opRecords);
|
||||
if (opRecords && opRecords.length > 0 && !dontPublish) {
|
||||
this.publish();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -84,11 +84,11 @@ class Cache extends Feature_1.Feature {
|
|||
try {
|
||||
this.refreshing++;
|
||||
const { result, opRecords, message } = await this.aspectWrapper.exec(name, params);
|
||||
callback && callback(result, opRecords);
|
||||
if (opRecords) {
|
||||
this.syncInner(opRecords);
|
||||
}
|
||||
this.refreshing--;
|
||||
callback && callback(result, opRecords);
|
||||
if (opRecords && opRecords.length > 0 && !dontPublish) {
|
||||
this.publish();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -149,11 +149,11 @@ export class Cache<
|
|||
try {
|
||||
this.refreshing++;
|
||||
const { result, opRecords, message } = await this.aspectWrapper.exec(name, params);
|
||||
callback && callback(result, opRecords);
|
||||
if (opRecords) {
|
||||
this.syncInner(opRecords);
|
||||
}
|
||||
this.refreshing--;
|
||||
callback && callback(result, opRecords);
|
||||
if (opRecords && opRecords.length > 0 && !dontPublish) {
|
||||
this.publish();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue