mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-17 15:03:07 +00:00
switched to self links as keys in the object cache
This commit is contained in:
@@ -70,10 +70,10 @@ export class RemoteDataBuildService {
|
||||
this.objectCache.getBySelfLink<TNormalized>(href, normalizedType).startWith(undefined),
|
||||
responseCacheObs
|
||||
.filter((entry: ResponseCacheEntry) => entry.response.isSuccessful)
|
||||
.map((entry: ResponseCacheEntry) => (entry.response as SuccessResponse).resourceUUIDs)
|
||||
.flatMap((resourceUUIDs: string[]) => {
|
||||
if (isNotEmpty(resourceUUIDs)) {
|
||||
return this.objectCache.get(resourceUUIDs[0], normalizedType);
|
||||
.map((entry: ResponseCacheEntry) => (entry.response as SuccessResponse).resourceSelfLinks)
|
||||
.flatMap((resourceSelfLinks: string[]) => {
|
||||
if (isNotEmpty(resourceSelfLinks)) {
|
||||
return this.objectCache.getBySelfLink(resourceSelfLinks[0], normalizedType);
|
||||
} else {
|
||||
return Observable.of(undefined);
|
||||
}
|
||||
@@ -137,7 +137,7 @@ export class RemoteDataBuildService {
|
||||
|
||||
const payload = responseCacheObs
|
||||
.filter((entry: ResponseCacheEntry) => entry.response.isSuccessful)
|
||||
.map((entry: ResponseCacheEntry) => (entry.response as SuccessResponse).resourceUUIDs)
|
||||
.map((entry: ResponseCacheEntry) => (entry.response as SuccessResponse).resourceSelfLinks)
|
||||
.flatMap((resourceUUIDs: string[]) => {
|
||||
return this.objectCache.getList(resourceUUIDs, normalizedType)
|
||||
.map((normList: TNormalized[]) => {
|
||||
|
Reference in New Issue
Block a user