Skip to content

Commit

Permalink
Adding Cache disabling to bake tasks and parent bakeshell.
Browse files Browse the repository at this point in the history
Fixes #1889
  • Loading branch information
markstory committed Aug 19, 2011
1 parent 68c4b66 commit 18acc65
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cake/console/libs/bake.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ function loadTasks() {
* @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;
Expand Down
11 changes: 11 additions & 0 deletions cake/console/libs/tasks/bake.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 18acc65

Please sign in to comment.