'The "_cake_model_" cache configuration does not exist after CakePHP upgrade 3.3.16 > 3.6.7
I am getting the error:
The "_cake_model_" cache configuration does not exist.
after upgrading from CakePHP v3.3.16 to 3.6.7.
However the cache configuration does exist, this from config/app.php:
'Cache' => [
'_cake_model_' => [
'className' => 'Cake\Cache\Engine\FileEngine',
'prefix' => 'myapp_cake_model_',
'path' => CACHE . 'models/',
'serialize' => true,
'duration' => '+2 minutes',
'url' => env('CACHE_CAKEMODEL_URL', null),
],
],
Anyone have an idea why this is happening?
Solution 1:[1]
You can check if that configuration data ends up in Cache with Cache::getConfig('_cake_model_') towards the end of your application bootstrap. If that fails your configuration data is likely not getting passed into Cache.
Solution 2:[2]
In my case it was NULL in the "className" position. The change below corrected the error.
'className' => 'File'
Maybe then there is a problem with correct reading of the className field.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Mark Story |
| Solution 2 | PLI52KA |
