File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -55,9 +55,17 @@ public function initialize()
5555 if (isset ($ config ['className ' ]) && $ config ['className ' ] instanceof DebugEngine) {
5656 $ instance = $ config ['className ' ];
5757 } elseif (isset ($ config ['className ' ])) {
58- Cache::drop ($ name );
59- $ instance = new DebugEngine ($ config , $ name , $ this ->logger );
58+ /** @var \Cake\Cache\CacheEngine $engine */
59+ $ engine = Cache::pool ($ name );
60+ // Unload from the cache registry so that subsequence calls to
61+ // Cache::pool($name) use the new config with DebugEngine instance set below.
62+ Cache::getRegistry ()->unload ($ name );
63+
64+ $ instance = new DebugEngine ($ engine , $ name , $ this ->logger );
65+ $ instance ->init ();
6066 $ config ['className ' ] = $ instance ;
67+
68+ Cache::drop ($ name );
6169 Cache::setConfig ($ name , $ config );
6270 }
6371 if (isset ($ instance )) {
You can’t perform that action at this time.
0 commit comments