Skip to content

Commit

Permalink
Remove now useless configuration data.
Browse files Browse the repository at this point in the history
Once configuration data has been injected into the various classes it is
no longer necessary in Configure. Keeping it in configure only consumes
more memory and give the impression that changing data in configure will
update the other classes.
  • Loading branch information
markstory committed Aug 31, 2013
1 parent aed6247 commit b76eb3a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions App/Config/bootstrap.php
Expand Up @@ -113,6 +113,15 @@
Email::config(Configure::read('Email'));
Log::config(Configure::read('Log'));

// Remove configuration data from Configure.
// We don't want to give the impression that this data is mutable.
Configure::delete('Cache');
Configure::delete('Datasources');
Configure::delete('EmailTransport');
Configure::delete('Email');
Configure::delete('Error');
Configure::delete('Log');

/**
* Custom Inflector rules, can be set to correctly pluralize or singularize table, model, controller names or whatever other
* string is passed to the inflection functions
Expand Down

0 comments on commit b76eb3a

Please sign in to comment.