public function Response::isFresh

Same name in this branch

Check if the response is considered fresh.

A response is considered fresh when its age is less than the freshness lifetime (maximum age) of the response.

Return value

bool|null

1 call to Response::isFresh()
Response::canCache in drupal/core/vendor/guzzle/http/Guzzle/Http/Message/Response.php
Check if the response can be cached

File

drupal/core/vendor/guzzle/http/Guzzle/Http/Message/Response.php, line 852

Class

Response
Guzzle HTTP response object

Namespace

Guzzle\Http\Message

Code

public function isFresh() {
  $fresh = $this
    ->getFreshness();
  return $fresh === null ? null : $this
    ->getFreshness() > 0;
}