milesj/utility — pull request #29 by Ali1 (2014-04-22 11:34:50+00:00)
Title: More consistent use of internal cache ($_cached)

Firstly, this pull incorporates some clean up of my previous coding as I am more familiar with the Cache class. I am not sure whether you intended for $_cache to be a functioning internal cache for the request to avoid multiple cache hits as the code is a bit inconsistent. In this commit, I ensure that any read or write to the cache acts as a primer for any future reads to avoid multiple identical hits to memcached/wincache/file in the same request.

Later, I'll do some work incorporating the new Cache::readMany implementation in Cake (https://github.com/cakephp/cakephp/pull/3313). Probably a readManyCache in this behaviour to use for example when you are sure you are going to x, y and z keys in this current request.