現状
herokuにて、下記サイトを参考にキャッシュ設定を行なったが、ログを見るとエラーが吐かれてます
https://qiita.com/tektoh/items/90f533c7f2a66e4a3fad
このエラーを消す方法がわかりません。
環境
cakephp 3.6
heroku
- add-on : memcachier
エラー
// 該当エラーログ(composer.jsonにてモジュール追加前) 2018-11-25 16:39:08 Warning: Warning (512): Cache engine Cake\Cache\Engine\MemcachedEngine is not properly configured. in [/app/vendor/cakephp/cakephp/src/Cache/Cache.php, line 176]
// 該当エラーログ(composer.jsonにてモジュール追加後) 2018-11-25T08:44:54.442017+00:00 app[web.1]: 10.43.205.53 - - [25/Nov/2018:17:44:53 +0900] "GET / HTTP/1.1" 500 33 "https://dashboard.heroku.com/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36
ソース
// composer.json "require": { "php": ">=5.6", "cakephp/cakephp": "3.6.*", "cakephp/migrations": "^2.0.0", "cakephp/plugin-installer": "^1.0", "josegonzalez/dotenv": "3.*", "mobiledetect/mobiledetectlib": "2.*", "ext-memcached": "*" // モジュールを追加 }, "require-dev": { "cakephp/bake": "^1.1", "cakephp/cakephp-codesniffer": "^3.0", "cakephp/debug_kit": "^3.15.0", "psy/psysh": "@stable", "heroku/heroku-buildpack-php": "*" },
// config/app_heroku.php app.phpの上書きファイル /** * Configure the cache adapters */ 'Cache' => [ 'default' => [ 'className' => 'Cake\Cache\Engine\MemcachedEngine', 'prefix' => 'myapp_cake_', 'servers' => [env('MEMCACHIER_SERVERS')], 'username' => env('MEMCACHIER_USERNAME'), 'password' => env('MEMCACHIER_PASSWORD'), 'duration' => '+1440 minutes', ], 'session' => [ 'className' => 'Cake\Cache\Engine\MemcachedEngine', 'prefix' => 'myapp_cake_session_', 'servers' => [env('MEMCACHIER_SERVERS')], 'username' => env('MEMCACHIER_USERNAME'), 'password' => env('MEMCACHIER_PASSWORD'), 'duration' => '+1440 minutes', ], '_cake_core_' => [ 'className' => 'Cake\Cache\Engine\MemcachedEngine', 'prefix' => 'myapp_cake_core_', 'servers' => [env('MEMCACHIER_SERVERS')], 'username' => env('MEMCACHIER_USERNAME'), 'password' => env('MEMCACHIER_PASSWORD'), 'duration' => '+1 years', ], '_cake_model_' => [ 'className' => 'Cake\Cache\Engine\MemcachedEngine', 'prefix' => 'myapp_cake_model_', 'servers' => [env('MEMCACHIER_SERVERS')], 'username' => env('MEMCACHIER_USERNAME'), 'password' => env('MEMCACHIER_PASSWORD'), 'duration' => '+1 years', ], ],
あなたの回答
tips
プレビュー