Definition
/**
* Create a CachingDetector.
*
* Wraps another detector and caches its results to a file. On subsequent
* calls, returns the cached resource instead of running detection again.
*
* @param ResourceDetector $detector The detector to wrap
* @param null|string $cachePath Cache file path (default: sys_get_temp_dir()/flow_telemetry_resource.cache)
*/
caching_detector(ResourceDetector $detector, ?string $cachePath) : CachingDetector