Overview
Caches function-call results to avoid unnecessary recomputation.
API Reference
Service for creating, checking, and reading cached call results by context object and function-call identity (function name + arguments).
export interface IFunctionCallResultCache {
create(
context: unknown,
result: IFunctionCallResult,
): IFunctionCallResultCacheEntry;
has(context: unknown, index: IFunctionCallIndex): boolean;
get(
context: unknown,
index: IFunctionCallIndex,
): IFunctionCallResultCacheEntry | undefined;
}import type { IFunctionCallResultCache } from '@rs-x/core';3 members in this interface.
create(
context: unknown,
result: IFunctionCallResult
): IFunctionCallResultCacheEntryParameters
get(
context: unknown,
index: IFunctionCallIndex
): IFunctionCallResultCacheEntry | undefinedParameters
Returns
IFunctionCallResultCacheEntry | undefined
has(
context: unknown,
index: IFunctionCallIndex
): booleanParameters
Returns
boolean