getMaxAge() public method

First, it checks for a s-maxage directive, then a max-age directive, and then it falls back on an expires header. It returns null when no maximum age can be established.
public getMaxAge ( ) : integer
return integer Number of seconds
Example #1
0
 /**
  * Test Client Ttl
  */
 public function testClientTtl()
 {
     $this->cacheControl->setClientTtl(3600);
     $this->assertEquals(3600, $this->cacheControl->getTtl());
     $this->assertEquals(3600, $this->cacheControl->getMaxAge());
     $this->assertEquals('max-age=3600', $this->response->getHeader('Cache-Control'));
 }