when setting the cache method to redis it seems to increase runtime for loading a spreadsheet and reading etc.
before i use any part of PHPSpreadsheet classes i run the following
if(CACHE_ON){
$client = new \Redis();
$client->connect(CACHE_HOST, 6379);
$pool = new \Cache\Adapter\Redis\RedisCachePool($client);
$simpleCache = new \Cache\Bridge\SimpleCache\SimpleCacheBridge($pool);
\PhpOffice\PhpSpreadsheet\Settings::setCache($simpleCache);
}
//...
try {
$fileType = IOFactory::identify($uploadFile);
} catch(\PhpOffice\PhpSpreadsheet\Reader\Exception $e) {
$message = 'Input file is not an Excel Workbook. Please save as an Excel Workbook and try again.';
$this->log->error('Error loading file: '.$e->getMessage() . mime_content_type($uploadFile) . $message);
return ['error'=>true,'message'=>$message];
}
I don't understand why it increases time by 1/2 seconds. is this normal behaviour or do i need to update anything in redis?