Merge branch 'w2p-122357_prevent-request-urls-from-being-fired-multiple-times-7.4' into w2p-122357_browse-performance-fixes_contribute-main

This commit is contained in:
Alexandre Vryghem
2025-01-17 00:51:57 +01:00

View File

@@ -11,6 +11,7 @@ import {
from as observableFrom,
Observable,
of as observableOf,
shareReplay,
} from 'rxjs';
import {
map,
@@ -288,6 +289,10 @@ export class BaseDataService<T extends CacheableObject> implements HALDataServic
isNotEmptyOperator(),
take(1),
map((href: string) => this.buildHrefFromFindOptions(href, {}, [], ...linksToFollow)),
shareReplay({
bufferSize: 1,
refCount: true,
}),
);
const startTime: number = new Date().getTime();
@@ -343,6 +348,10 @@ export class BaseDataService<T extends CacheableObject> implements HALDataServic
isNotEmptyOperator(),
take(1),
map((href: string) => this.buildHrefFromFindOptions(href, options, [], ...linksToFollow)),
shareReplay({
bufferSize: 1,
refCount: true,
}),
);
const startTime: number = new Date().getTime();