public function onRoute(MvcEvent $e)
{
if ($this->cacheIsActive($e) === false) {
return;
}
if (!$e->getRequest() instanceof HttpRequest) {
return;
}
$serviceManager = $e->getApplication()->getServiceManager();
$data = $serviceManager->get('CacheService')->load($e);
if ($data !== null) {
$this->loadedFromCache = true;
$response = unserialize($data);
return $response;
}
}