laravel/framework — pull request #3362 by lucasmichot (2014-01-28 15:13:53+00:00)
Title: [PROPOSAL] Cache::macro()

Allows the usage of `Cache::macro()` function.
This way I can register a Cache macro one time and use it everywhere in my code.

Below an example usage:

````php
// create a 'getItem' macro
Cache::macro('getItem', function ($id)
{
return Cache::get('my-item-'. $key);
}):

// use the 'getItem' macro
echo Cache::getItem(42);
````

Replace #3361