Cache redesign part 2

This commit is contained in:
Art Lowel
2021-01-20 14:34:08 +01:00
parent 64ba6293c9
commit c66de4fe91
155 changed files with 1610 additions and 1637 deletions

View File

@@ -82,17 +82,6 @@ export const alternativeLinkIndexSelector: MemoizedSelector<CoreState, IndexStat
(state: MetaIndexState) => state[IndexName.ALTERNATIVE_OBJECT_LINK]
);
/**
* Return the request UUID mapping index based on the MetaIndexState
*
* @returns
* a MemoizedSelector to select the request UUID mapping
*/
export const requestUUIDIndexSelector: MemoizedSelector<CoreState, IndexState> = createSelector(
metaIndexSelector,
(state: MetaIndexState) => state[IndexName.UUID_MAPPING]
);
/**
* Return the self link of an object in the object-cache based on its UUID
*
@@ -121,21 +110,6 @@ export const uuidFromHrefSelector =
(state: IndexState) => hasValue(state) ? state[getUrlWithoutEmbedParams(href)] : undefined
);
/**
* Return the UUID of a cached request based on the UUID of a request
* that wasn't sent because the response was already cached
*
* @param uuid
* The UUID of the new request
* @returns
* a MemoizedSelector to select the UUID of the cached request
*/
export const originalRequestUUIDFromRequestUUIDSelector =
(uuid: string): MemoizedSelector<CoreState, string> => createSelector(
requestUUIDIndexSelector,
(state: IndexState) => hasValue(state) ? state[uuid] : undefined
);
/**
* Return the self link of an object based on its alternative link
*