public static function isRequestCacheable(Google_Http_Request $resp)
  {
    $method = $resp->getRequestMethod();
    if (! in_array($method, self::$CACHEABLE_HTTP_METHODS)) {
      return false;
    }

    // Don't cache authorized requests/responses.
    // [rfc2616-14.8] When a shared cache receives a request containing an
    // Authorization field, it MUST NOT return the corresponding response
    // as a reply to any other request...
    if ($resp->getRequestHeader("authorization")) {
      return false;
    }

    return true;
  }
public static function isRequestCacheable(Google_Http_Request $resp)
  {
    $method = $resp->getRequestMethod();
    if (! in_array($method, self::$CACHEABLE_HTTP_METHODS)) {
      return false;
    }

    // Don't cache authorized requests/responses.
    // [rfc2616-14.8] When a shared cache receives a request containing an
    // Authorization field, it MUST NOT return the corresponding response
    // as a reply to any other request...
    if ($resp->getRequestHeader("authorization")) {
      return false;
    }

    return true;
  }
public static function isRequestCacheable ( Google_Http_Request $ resp ) { $ method = $ resp -> getRequestMethod ( ) ; if ( ! in_array ( $ method , self :: $ CACHEABLE_HTTP_METHODS ) ) { return false ; } // Don't cache authorized requests/responses. // [rfc2616-14.8] When a shared cache receives a request containing an // Authorization field, it MUST NOT return the corresponding response // as a reply to any other request... if ( $ resp -> getRequestHeader ( "authorization" ) ) { return false ; } return true ; }
Check if an HTTP request can be cached by a private local cache.

@static
@param Google_Http_Request $resp
@return bool True if the request is cacheable.
False if the request is uncacheable.
Check if an HTTP request can be cached by a private local cache .