Permalink
Browse files

Adding Cache disabling to bake tasks and parent bakeshell.

Fixes #1889
  • Loading branch information...
1 parent 68c4b66 commit 18acc65fe1fd22b42b999559234abead4c1bd691 @markstory markstory committed Aug 19, 2011
Showing with 13 additions and 0 deletions.
  1. +2 −0 cake/console/libs/bake.php
  2. +11 −0 cake/console/libs/tasks/bake.php
@@ -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;
@@ -43,6 +43,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.
*

0 comments on commit 18acc65

Please sign in to comment.