This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v20.6
Cache info
|
Cache info {( dbFilter )} -> Function result | ||||||||
Parameter | Type | Description | ||||||
dbFilter | Object |
![]() |
Defines list of attributes to be returned (filtered per DB) | |||||
Function result | Object |
![]() |
Information about cache | |||||
The Cache info command returns an object that contains detailed information about the current cache contents (used memory, loaded tables and indexes, etc.)
Note: This command only works in local mode (4D Server and 4D); it must not be used from 4D in remote mode.
By default, returned information refers to the running database only. The optional dbFilter object parameter allows you to specify the scope of the command:
The Cache info command returns a single object that contains all the relevant information about the cache. The returned object has the following basic structure:
{
"maxMem": Maximum cache size (real),
"usedMem": Current cache size (real),
"objects": [...] Array of objects currently loaded in cache
}
Elements of the objects array are root objects (tables, indexes, Blobs, etc.) which are currently loaded in the cache. Each element contains specific attributes that describe its current status. For more information about advanced interpretation of this data, please contact your local Technical Service department.
You want to get cache information for the current database:
C_OBJECT($cache)
$cache:=Cache info
You want to get cache information for the database and all opened components:
C_OBJECT($dbFilter)
OB SET($dbFilter;"dbFilter";"All")
$cache:=Cache info($dbFilter)
Product: 4D
Theme: Cache Management
Number:
1402
Created: 4D v16
4D Language Reference ( 4D v20)
4D Language Reference ( 4D v20.1)
4D Language Reference ( 4D v20.2)
4D Language Reference ( 4D v20.3)
4D Language Reference ( 4D v20.4)
4D Language Reference ( 4D v20.5)
4D Language Reference ( 4D v20.6)