我收到错误:The "_cake_model_" cache configuration does not exist.
在从CakePHP v3.3.16升级到3.6.7之后。
然而该高速缓存配置确实存在,这来自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),
],
],
有人知道为什么会这样吗?
2条答案
按热度按时间az31mfrm1#
您可以检查配置数据是否在应用程序引导结束时以
Cache::getConfig('_cake_model_')
结束在缓存中。如果失败,您的配置数据很可能没有传递到Cache
。ff29svar2#
在我的例子中,它在“className”位置是NULL。下面的更改纠正了这个错误。
可能是className字段的正确阅读出现了问题。