Documentation
IPS_GetFileCacheStats
array IPS_GetFileCacheStats ()
Returns
An array with the following key => value pairs:
| Index | Type | Description |
|---|---|---|
| Count | integer | Number of files in the cache |
| TotalBytes | integer | Estimated memory usage of the cache in bytes |
Description
This function is intended for internal use only and may change or be removed at any time without notice.
The function returns the size of the file cache of the WebServer. So that large, frequently requested files of the console and the tile visualization (e.g. the JavaScript of the console and the code editor) do not have to be read and compressed on every request, they are stored once gzip compressed including their ETag hash in memory after the start of IP-Symcon. As long as the cache has not been built yet, the function returns 0 for both values.
The bytes are an estimate of the occupied memory based on the stored data structures and not an exact measurement.
Example
// Output the size of the file cache
print_r(IPS_GetFileCacheStats());
/* e.g. returns:
Array
(
[Count] => 5
[TotalBytes] => 4718592
)
*/