ntk-cms-api 1.2.235 → 1.2.236
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/lib/service/base/apiCmsServerBase.service.mjs +2 -2
- package/esm2020/lib/service/base/apiServerBase.service.mjs +2 -2
- package/fesm2015/ntk-cms-api.mjs +2 -2
- package/fesm2015/ntk-cms-api.mjs.map +1 -1
- package/fesm2020/ntk-cms-api.mjs +2 -2
- package/fesm2020/ntk-cms-api.mjs.map +1 -1
- package/package.json +1 -1
package/fesm2020/ntk-cms-api.mjs
CHANGED
|
@@ -1266,7 +1266,7 @@ class ApiServerBase {
|
|
|
1266
1266
|
this.accessLoad = false;
|
|
1267
1267
|
this.cachApiResult = [];
|
|
1268
1268
|
this.cachApiCallDate = [];
|
|
1269
|
-
this.cashApiSeconds =
|
|
1269
|
+
this.cashApiSeconds = 5000;
|
|
1270
1270
|
this.childConstructor();
|
|
1271
1271
|
this.headers = new Map();
|
|
1272
1272
|
}
|
|
@@ -1680,7 +1680,7 @@ class ApiCmsServerBase extends ApiServerBase {
|
|
|
1680
1680
|
const serviceNameKay = serviceName + '_' + id;
|
|
1681
1681
|
if (this.getModuleCashService().includes(serviceName)) {
|
|
1682
1682
|
do {
|
|
1683
|
-
if (this.cachApiResult[serviceNameKay]?.isSuccess)
|
|
1683
|
+
if (this.cachApiResult[serviceNameKay]?.isSuccess && (new Date().getTime() - this.cachApiCallDate[serviceNameKay].getTime()) < this.cashApiSeconds)
|
|
1684
1684
|
return of(this.cachApiResult[serviceNameKay]);
|
|
1685
1685
|
} while (this.cachApiCallDate[serviceNameKay] && (new Date().getTime() - this.cachApiCallDate[serviceNameKay].getTime()) < this.cashApiSeconds);
|
|
1686
1686
|
this.cachApiCallDate[serviceNameKay] = new Date();
|