cakephp/cakephp — pull request #1534 by markstory (2013-08-17 02:42:58+00:00)
Title: 3.0 cache log config changes

After @lorenzo 's comments on my last pull request I've added the ability to read config data back out of Cache and Log. In addition to that I've done a few other things.

* Made it simpler to inject built objects into Cache/Log.
* Made it simple to use a factory function to help with more complicated engine construction.
* Renamed 'engine' to 'className'. This is more conformant to the rest of CakePHP. `engine` will continue working though for now.

I also removed `Cache.disable` from Configure. I've always disliked this configure value. It is now part of the Cache class so it doesn't need to interact with Configure making the check cheaper, simpler and Cache more self contained.

I think there is an opportunity to extract `config()` and `drop()` into a trait if there are a few more similar uses. With only two uses it doesn't make much sense right now. But if another class re-uses the same pattern it will be useful.

I spent some time and [drafted up some ideas](https://github.com/markstory/cakephp/wiki/Config-methods) on how config methods on other classes could work as well. Any feedback on that is more than welcome.