cakephp/cakephp — pull request #2599 by markstory (2014-01-03 15:31:41+00:00)
Title: 3.0 make query caching simpler

Add `Query::cache()` as discussed in #2562. I decided to make the caching a separate object as it was complex enough that it could standalone.

After this change caching results of find() operations is super easy and only takes one method call. While this introduces some coupling between the ORM and Cache packages, I've intentionally left off any type hints to hopefully free up the dependencies allowing people to substitute any object that implements read/write into the query cacher.