FriendsOfSymfony/FOSHttpCacheBundle — pull request #177 by dbu (2014-12-01 12:01:52+00:00)
Title: [WIP] Moving the user context logic out of the kernel inheritance hierarchy.

fix #170

This is just a rough sketch but as we talk about other cache kernel features i wanted to show how this can look.

In fact, what we probably want is kind of an event handler for the kernel at this point. This should not get too complicated, but maybe just have a list of kernel "extensions" (bad name, its already used for the bundle config handler class) and call each in turn during handle. The setup would then be:

```
$kernel = new HttpCache($kernel);
$kernel->registerHandler(new UserContextHandler());
$kernel->registerHandler(new PurgeHandler());
$kernel->registerHandler(new BanHandler());
```