0

Does drupal_http_request ever cache results?

I am making a request that looks something like:

$url = "http://www.example.com/some/rest/service?" . drupal_http_build_query(array(
    "id" => 1234,
));

$options = array(
    "headers" => array(
        "Pragma" => "no-cache",
        "Cache-Control" => "no-cache",
    ),
);

$response = drupal_http_request($url, $options);

The problem is that I am getting back some cached results. I am not looking for ways to cachebust this request; I am trying to rule out Drupal caching this internally so I can work with the far end to see why their Varnish is being weird.

1 Answer 1

3

No, drupal_http_request() is not doing any kind of caching. If the results are cached then it's either the server or some intermediary system, e.g. a proxy.

2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.