ftos.data.getByQueryAndCache

IMPORTANT!  
Starting with v24.3.0, this is renamed from getByQueryAndCache to ftos.data.getByQueryAndCache.

Returns a fetch result set. If available, the result set is retrieved from cache. Otherwise, it is saved in cache.

To improve fetch performance, you can cache the results of a fetch on its first run. Thus, on subsequent runs, the fetch results will be retrieved directly from the memory cache instead of accessing the database again.

NOTE  

Cached results are stored in the memory cache for 30 minutes.

To set or retrieve a cached result, you must assign a unique cache key to your fetch:

This is a data service method for business service components.

Syntax

Copy
function getByQuery(fetch : IFtosFetch, cacheKey: string): any[];
 
Parameter Type Description
fetch IFtosFetch The code of the fetch query.
cacheKey string Cache key that identifies the cached result set.

Type Aliases

Return Value

Returns a JSON object that contains the fetch result set.

Examples