/** * Check if a page is saved in the cache and return contents. * Return null when no item is found. * * @param MvcEvent $e Mvc Event * * @return mixed */ public function load(MvcEvent $e) { $id = $this->createId($e->getRequest()); if (!$this->cacheStorage->hasItem($id)) { return null; } $event = new CacheEvent(CacheEvent::EVENT_LOAD, $this); $event->setCacheKey($id); $this->getEventManager()->trigger($event); if ($event->getAbort()) { return null; } return $this->cacheStorage->getItem($id); }