TurnCache
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new TurnCache(): TurnCache;Returns
Section titled “Returns”TurnCache
Accessors
Section titled “Accessors”Get Signature
Section titled “Get Signature”get size(): number;Number of cached queries.
Returns
Section titled “Returns”number
Methods
Section titled “Methods”clear()
Section titled “clear()”clear(): void;Clear all cached entries.
Returns
Section titled “Returns”void
get(query): RetrievalResult[] | undefined;Get cached results for an exact query string. Returns undefined on cache miss.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
Returns
Section titled “Returns”RetrievalResult[] | undefined
has(query): boolean;Check if the cache has results for a query.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
Returns
Section titled “Returns”boolean
set(query, results): void;Store results for a query string.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
|
|
Returns
Section titled “Returns”void