setClientTtl() public method

This method adjusts the Cache-Control/max-age directive.
public setClientTtl ( integer $seconds ) : void
$seconds integer Number of seconds
return void
コード例 #1
0
ファイル: CacheControlTest.php プロジェクト: dezvell/mm.local
 /**
  * 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'));
 }