Gc\Mvc\Service\CacheService::save PHP Method

save() public method

Save the page contents to the cache storage.
public save ( MvcEvent $e ) : void
$e Zend\Mvc\MvcEvent Mvc Event
return void
    public function save(MvcEvent $e)
    {
        if (!$this->shouldCacheRequest($e)) {
            return;
        }
        $id = $this->createId($e->getRequest());
        $item = serialize($e->getResponse());
        $this->cacheStorage->setItem($id, $item);
        $this->getEventManager()->trigger(new CacheEvent(CacheEvent::EVENT_SAVE, $this));
    }