public function save(MvcEvent $mvcEvent)
    {
        if (!$this->shouldCacheRequest($mvcEvent)) {
            return;
        }

        $id = $this->getIdGenerator()->generate();

        $item = ($this->getOptions()->getCacheResponse() === true) ? serialize($mvcEvent->getResponse()) : $mvcEvent->getResponse()->getContent();

        $this->getCacheStorage()->setItem($id, $item);

        $cacheEvent = $this->createCacheEvent(CacheEvent::EVENT_SAVE, $mvcEvent, $id);
        $this->getEventManager()->triggerEvent($cacheEvent);

        $cacheStorage = $this->getCacheStorage();
        if ($cacheStorage instanceof TaggableInterface) {
            $tags = array_unique(array_merge($this->getTags($mvcEvent), $cacheEvent->getTags()));
            $cacheStorage->setTags($id, $this->prefixTags($tags));
        }
    }