Get the Age HTTP header
bool $headerOnly Set to TRUE to only retrieve the Age header rather than calculating the age:
integer|null Returns the age the object has been in a proxy cache in seconds.
public function getAge($headerOnly = false) {
$age = $this
->getHeader('Age', true);
if (!$headerOnly && $age === null && $this
->getDate()) {
$age = time() - strtotime($this
->getDate());
}
return $age;
}