Adding Cache disabling to bake tasks and parent bakeshell.

Fixes #1889
This commit is contained in:
Mark Story 2011-08-19 12:35:59 -04:00
parent 68c4b66550
commit 18acc65fe1
2 changed files with 13 additions and 0 deletions

View file

@ -69,6 +69,8 @@ class BakeShell extends Shell {
* @access public
*/
function main() {
Configure::write('Cache.disable', 1);
if (!is_dir($this->DbConfig->path)) {
if ($this->Project->execute()) {
$this->DbConfig->path = $this->params['working'] . DS . 'config' . DS;

View file

@ -42,6 +42,17 @@ class BakeTask extends Shell {
*/
var $interactive = false;
/**
* Disable caching for baking.
* This forces the most current database schema to be used.
*
* @return void
*/
function startup() {
Configure::write('Cache.disable', 1);
parent::startup();
}
/**
* Gets the path for output. Checks the plugin property
* and returns the correct path.