interface IProxyCache {
    addDfspIdToProxyMapping: (
        dfspId: string,
        proxyId: string,
    ) => Promise<boolean>;
    connect: () => Promise<RedisConnectionStatus>;
    disconnect: () => Promise<boolean>;
    healthCheck: () => Promise<boolean>;
    isConnected: boolean;
    isPendingCallback: (alsRequest: AlsRequestDetails) => Promise<boolean>;
    lookupProxyByDfspId: (dfspId: string) => Promise<null | string>;
    processExpiredAlsKeys: (
        callbackFn: ProcessExpiryKeyCallback,
        batchSize: number,
    ) => Promise<unknown>;
    processExpiredProxyGetPartiesKeys: (
        callbackFn: ProcessExpiryKeyCallback,
        batchSize: number,
    ) => Promise<unknown>;
    receivedErrorResponse: (
        alsRequest: AlsRequestDetails,
        proxyId: string,
    ) => Promise<boolean>;
    receivedSuccessResponse: (
        alsRequest: AlsRequestDetails,
    ) => Promise<boolean>;
    removeDfspIdFromProxyMapping: (dfspId: string) => Promise<boolean>;
    removeProxyGetPartiesTimeout: (
        alsReq: AlsRequestDetails,
        proxyId: string,
    ) => Promise<boolean>;
    setProxyGetPartiesTimeout: (
        alsReq: AlsRequestDetails,
        proxyId: string,
        ttlSec?: number,
    ) => Promise<boolean>;
    setSendToProxiesList: (
        alsRequest: AlsRequestDetails,
        proxyIds: string[],
        ttlSec: number,
    ) => Promise<boolean>;
}

Properties

addDfspIdToProxyMapping: (dfspId: string, proxyId: string) => Promise<boolean>
connect: () => Promise<RedisConnectionStatus>
disconnect: () => Promise<boolean>
healthCheck: () => Promise<boolean>
isConnected: boolean
isPendingCallback: (alsRequest: AlsRequestDetails) => Promise<boolean>
lookupProxyByDfspId: (dfspId: string) => Promise<null | string>
processExpiredAlsKeys: (
    callbackFn: ProcessExpiryKeyCallback,
    batchSize: number,
) => Promise<unknown>
processExpiredProxyGetPartiesKeys: (
    callbackFn: ProcessExpiryKeyCallback,
    batchSize: number,
) => Promise<unknown>
receivedErrorResponse: (
    alsRequest: AlsRequestDetails,
    proxyId: string,
) => Promise<boolean>

Returns true if the last failed response is detected. In that case Parties error callback should be sent.

receivedSuccessResponse: (alsRequest: AlsRequestDetails) => Promise<boolean>
removeDfspIdFromProxyMapping: (dfspId: string) => Promise<boolean>
removeProxyGetPartiesTimeout: (
    alsReq: AlsRequestDetails,
    proxyId: string,
) => Promise<boolean>
setProxyGetPartiesTimeout: (
    alsReq: AlsRequestDetails,
    proxyId: string,
    ttlSec?: number,
) => Promise<boolean>
setSendToProxiesList: (
    alsRequest: AlsRequestDetails,
    proxyIds: string[],
    ttlSec: number,
) => Promise<boolean>

Should be called if there's no party's DFSP from Oracle GET /participant/{ID} request, before sending discovery calls to all available proxies.