laravel/framework — pull request #5935 by lucasmichot (2014-10-01 09:38:47+00:00)
Title: [4.2] Cache : add events

Add cache events, so that the following events can now be listened:

```php
// when a cache item is not found
Event::listen('cache.missed', function($key) { ... });

// when a cache item is successfully retrieved
// note : $duration = 0 when using Cache::forever()
Event::listen('cache.hit', function($key, $value) { ... });

// when a cache entry is written
Event::listen('cache.write', function($key, $value, $duration) { ... });

// when a cache entry is deleted
Event::listen('cache.delete', function($key) { ... });
```
Related to https://github.com/laravel/framework/issues/5581
Closes https://github.com/laravel/framework/pull/5919