laravel/framework — pull request #3361 by lucasmichot (2014-01-28 14:29:03+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);
````