cakephp/cakephp — pull request #1704 by markstory (2013-10-05 17:39:12+00:00)
Title: 2.5 - Add Cache::remember()

I frequently use read-through caching strategies in my applications. This often ends up being repetitive code, that gets pushed into a helper function. I thought it might be useful to have this as a pre-baked workflow in Cache.

This new method allows you to provide callables that provide data for a cache key should the cache key not exist.

For example a model function could easily be used to cache results. Assuming you are using PHP 5.4 or later.

```php
find('all');
});
}
}
```