Skip to content

Commit

Permalink
Add mutator for cacheMetadata config.
Browse files Browse the repository at this point in the history
I need to modify this config option during test cases, and I don't want
to allow all the config options to be mutable.
  • Loading branch information
markstory committed May 20, 2014
1 parent 463918b commit c39657a
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/Database/Connection.php
Expand Up @@ -550,6 +550,19 @@ public function logQueries($enable) {
$this->_logQueries = $enable;
}

/**
* Enables or disables metadata caching for this connectino
*
* Changing this setting will not modify existing schema collections objects.
*
* @param bool|string $cache Either boolean false to disable meta dataing caching, or
* true to use `_cake_model_` or the name of the cache config to use.
* @return void
*/
public function cacheMetadata($cache) {
$this->_config['cacheMetadata'] = $cache;
}

/**
* Sets the logger object instance. When called with no arguments
* it returns the currently setup logger instance.
Expand Down

0 comments on commit c39657a

Please sign in to comment.