public function onBeforeRequest(ProxyEvent $event)
 {
     $response = $this->fetch($event['request']);
     if ($response) {
         // tell proxy client that we do not need to actually perform any HTTP requests
         $event['request']->params->set('request.complete', true);
         // replace response
         // TODO: must be a better way
         $event['response']->setContent($data->getContent());
         $event['response']->headers->replace($data->headers->all());
         $event['response']->headers->set('X-Cache', 'hit');
         // don't need any plugin to modify this request any further because response is already in place
         $event->stopPropagation();
     } else {
         $event['response']->headers->set('X-Cache', 'miss');
     }
 }