Returns true if the response is "fresh".
Fresh responses may be served from cache without any interaction with the origin. A response is considered fresh when it includes a Cache-Control/max-age indicator or Expiration header and the calculated age is less than the freshness lifetime.
@api
Boolean true if the response is fresh, false otherwise
public function isFresh() {
return $this
->getTtl() > 0;
}