ENHANCEMENT Ticket (pending)
Using debug view disables generated of cache files
###What happened:
Cache files are not being generated when debug kit is in effect
###What was expected:
Cache files to be generated....
###Code
Since debug view overloads the _getLayoutFilename method, it removes the extensions of the layout, which means that later on in the view class
{{{
if (substr($layoutFileName, -3) === 'ctp' || substr($layoutFileName, -5) === 'thtml') {
$this->output = View::_render($layoutFileName, $data_for_layout, $loadHelpers, true);
} else {
$this->output = $this->_render($layoutFileName, $data_for_layout, $loadHelpers);
}
}}}
The render function is called with the cache setting to be false. There must be a reason to overload the _getLayoutFilename class, I'm just wondering why??
Cheers,
Craig
on 09.13.09
reported by: morrislaptop
on 09.14.09
by mark_story
- version was changed to 1.1
- type was changed to enhancement
There is a very good reason, its even in the code snippet you pasted. You can see out `View::_render()` is called with different arguments than `$this->_render()`. This is old legacy code, and has been removed for the upcoming 1.3 release of CakePHP. So until then I can't do much about DebugView not working with Full page caches. My suggestion is to not load DebugKit when in a production situation as it decreases performance, and can cause quirks as you noted. Moving to an enhancement, thanks for reporting :)
