ManaPHP\Http\Response::setExpires PHP Method

setExpires() public method

Sets a Expires header to use HTTP cache $this->response->setExpires(new DateTime());
public setExpires ( integer $timestamp ) : static
$timestamp integer
return static
    public function setExpires($timestamp)
    {
        $date = new \DateTime('now', new \DateTimeZone('UTC'));
        $date->setTimestamp($timestamp);
        $date->setTimezone(new \DateTimeZone('UTC'));
        $this->setHeader('Expires', $date->format('D, d M Y H:i:s') . ' GMT');
        return $this;
    }