Add apiService cachedRequest function, apply to outspends requests

This commit is contained in:
Mononaut
2023-11-11 07:16:59 +00:00
parent 7142d69dda
commit 3f0c3c1952
3 changed files with 52 additions and 4 deletions

View File

@@ -123,7 +123,7 @@ export class TxBowtieGraphComponent implements OnInit, OnChanges {
.pipe(
switchMap((txid) => {
if (!this.cached) {
return this.apiService.getOutspendsBatched$([txid]);
return this.apiService.cachedRequest(this.apiService.getOutspendsBatched$, 5000, [txid]);
} else {
return of(null);
}