Selva Compute API Reference - v2.1.0
    Preparing search index...

    Type Alias CacheKeyExecutor

    CacheKeyExecutor: (
        definition: string | Uint8Array,
        dataTree: DataTree[],
        cacheKey: string | null,
        config: GrasshopperComputeConfig,
    ) => Promise<
        {
            cacheKey: string
            | null;
            missed: boolean;
            response: GrasshopperComputeResponse;
        },
    >

    Cache-key-aware executor. When cacheKey is provided, the executor solves by reference (pointer: cacheKey) and falls back to a full upload on a server cache miss. Always reports the (possibly refreshed) cacheKey so the scheduler can update its definition→key map, plus whether the fast path missed (for telemetry). When cacheKey is null it's a first solve — upload fully and capture the key the server assigns.

    Supplied by the client (which owns the solve primitives); the scheduler stays decoupled from the transport.

    Type Declaration

      • (
            definition: string | Uint8Array,
            dataTree: DataTree[],
            cacheKey: string | null,
            config: GrasshopperComputeConfig,
        ): Promise<
            {
                cacheKey: string
                | null;
                missed: boolean;
                response: GrasshopperComputeResponse;
            },
        >
      • Parameters

        Returns Promise<
            {
                cacheKey: string
                | null;
                missed: boolean;
                response: GrasshopperComputeResponse;
            },
        >