src/NeobazaarPrerenderListenerModule/Mvc/PrerenderListener.php
public function onPrerenderPost(PrerenderEvent $events) 
    {
        $cache = $this->getServiceLocator()->get($this->moduleOptions->getCacheKey());
        $response = $events->getResponse();
        $key = $this->getCacheEntryKey($events->getRequest());
        $cache->setItem($key, $events->getResponse());
        
        return $this;
    }
public function onPrerenderPost(PrerenderEvent $events) 
    {
        $cache = $this->getServiceLocator()->get($this->moduleOptions->getCacheKey());
        $response = $events->getResponse();
        $key = $this->getCacheEntryKey($events->getRequest());
        $cache->setItem($key, $events->getResponse());
        
        return $this;
    }
public function onPrerenderPost ( PrerenderEvent $ events ) { $ cache = $ this -> getServiceLocator ( ) -> get ( $ this -> moduleOptions -> getCacheKey ( ) ) ; $ response = $ events -> getResponse ( ) ; $ key = $ this -> getCacheEntryKey ( $ events -> getRequest ( ) ) ; $ cache -> setItem ( $ key , $ events -> getResponse ( ) ) ; return $ this ; }
Putting in cache the response.
We arrive here if no valid cache entry found

@param EventManagerInterface $events
@return PrerenderListener
Putting in cache the response . We arrive here if no valid cache entry found