This method adjusts the Cache-Control/max-age directive.
public setClientTtl ( integer $seconds ) : void | ||
$seconds | integer | Number of seconds |
Результат | void |
/** * 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')); }