UnionOfRAD/lithium — pull request #1086 by davidpersson (2014-05-03 13:18:57+00:00)
Title: BC break; use class filters instead of adapter filters in `Cache`.

This changes how the Cache class can be filtered. Instead of applying
filters to a single adapter (configuration) you must/can now filter the
Cache class' static methods directly.

This makes clear which filters are used when. I.e. when I read the docblock of
Cache::write() and see I can filter it, I'd exepct that I can directly filter
that method and not indirectly the adapter method.

This is an attempt to remove very granular filtering points and move them to a
higher level. It is assumed that filtering on adapter level is seldomly used.

You should update you code as per this example:

```
// OLD
Cache::config(array(
'default' => array(
'adapter' => 'File',
'filters' => array(
'write' => function($self, $params, $chain) {
// ...
}
)
)
));
```

```
// NEW
Cache::config(array(
'default' => array(
'adapter' => 'File'
)
));

Cache::applyFilter('write', function($self, $params, $chain) {
// ...
});
```