optimizer.php
Table of Contents
- optimizeDataFile() : mixed
- Optimize a DeviceAtlas JSON data file and populate the cache. The API will use the latest optimized cached files.
- clearOptimizationCache() : mixed
- Clear all files and directories which contain DeviceAtlas cached/temp files.
- analysePerformance() : mixed
- Analyse speed and memory performance before.
- analyseOptimizedPerformance() : mixed
- getUas() : mixed
Functions
optimizeDataFile()
Optimize a DeviceAtlas JSON data file and populate the cache. The API will use the latest optimized cached files.
optimizeDataFile(mixed $jsonDataFilePath[, mixed $tempDir = null ][, mixed $force = false ]) : mixed
Note that when using the API (configured to use optimized data file), when a new data file is passed to the API "loadDataFromFile()" method if the file is not optimized it will automatically be optimized. However this will cause a small lag for the request which the optimization is done at. The bellow function may be used instead.
Parameters
- $jsonDataFilePath : mixed
- $tempDir : mixed = null
- $force : mixed = false
Return values
mixed —clearOptimizationCache()
Clear all files and directories which contain DeviceAtlas cached/temp files.
clearOptimizationCache([mixed $tempDir = null ]) : mixed
Parameters
- $tempDir : mixed = null
Return values
mixed —analysePerformance()
Analyse speed and memory performance before.
analysePerformance(mixed $jsonDataFilePath[, mixed $tempDir = null ]) : mixed
Parameters
- $jsonDataFilePath : mixed
- $tempDir : mixed = null
Return values
mixed —analyseOptimizedPerformance()
analyseOptimizedPerformance(mixed $jsonDataFilePath[, mixed $tempDir = null ]) : mixed
Parameters
- $jsonDataFilePath : mixed
- $tempDir : mixed = null
Return values
mixed —getUas()
getUas() : mixed