Write results to cache file is option is set in config