Monitors the hit ratio, and returns an integer that specifies the cache hit ratio. The hit ratio is defined as the ratio between the number of times a record was found in a cache divided by the total number of times the cache was searched. The cache efficiency is determined by the hit ratio.
|
Syntax
|
DbCache (number,generation)
|
Parameters:
|
number: A number that represents the data source's sequence number in the Data repository.
|
|
generation: A number that represents the task's hierarchic position in the runtime task tree. 0 represents the current task, 1 its immediate ancestor, and so on.
|
Returns:
|
The function will return an integer between 0-100 that specifies the hit ratio.
|
Example:
|
DbCache ('1' DSOURCE, 0) will return the hit ratio for the first data source defined in the Data repository in the current task. Note: The DSOURCE literal can be used.
|
See also:
|
The Online and Rich Client Samples projects (program SQ16 and RSQ16)
|