setSharedMaxAge() public method

This methods sets the Cache-Control s-maxage directive.
public setSharedMaxAge ( integer $value ) : void
$value integer Number of seconds
return void
Beispiel #1
0
 /**
  * Test CacheControl as public
  */
 public function testCacheControlPublic()
 {
     $this->cacheControl->setSharedMaxAge(3600);
     $this->assertEquals(3600, $this->cacheControl->getMaxAge());
     $this->assertEquals('public, s-maxage=3600', $this->response->getHeader('Cache-Control'));
 }