I’m trying to see if an application I have can be tuned any better. I’ve spent a lot of time fine tuning database indexes and the improvements have been quite noticeable, which is great.
I then started reading https://www.yiiframework.com/doc/guide/2.0/en/tutorial-performance-tuning#enable-schema-caching regarding enabling caching, so I implemented the settings, but I’m not seeing much improvement, even some slowdowns.
I add the settings to my common\main-local.php
<?php
return [
'components' => [
// caching - also see db component for settings
'cache' => [
'class' => 'yii\caching\FileCache',
],
'db' => [
'class' => 'yii\db\Connection',
'dsn' => 'mysql:host=localhost;dbname=xxxx',
'username' => 'xxxx',
'password' => 'xxxx',
'charset' => 'utf8',
// caching - 3 next lines
'enableSchemaCache' => true,
'schemaCacheDuration' => 43200, // 12 hours
'schemaCache' => 'cache',
],
],
];
Am I doing something wrong?
Just looking for any pointers?