Ejemplo n.º 1
0
 /**
  * Set appropriate Cache-Control headers
  * We have to set public headers in order to tell Varnish and Builtin app that page should be cached
  *
  * @param \Magento\Framework\View\Layout $subject
  * @param mixed $result
  * @return mixed
  */
 public function afterGenerateXml(\Magento\Framework\View\Layout $subject, $result)
 {
     if ($subject->isCacheable() && $this->config->isEnabled()) {
         $this->response->setPublicHeaders($this->config->getTtl());
     }
     return $result;
 }
Ejemplo n.º 2
0
 public function testGetTll()
 {
     $this->_coreConfigMock->expects($this->once())->method('getValue')->with(Config::XML_PAGECACHE_TTL);
     $this->_model->getTtl();
 }