• Resolved juslintek

    (@juslintek)


    Hi I’m wondering if wp_remote_* functions, have something like curl has CURLOPT_FORBID_REUSE => false, which save connection inside a resource and it is kept in memory, so when requests to same domain or url not quite exactly sure. Increase speed. I’ve tried it with multiple different requests to some apis and it skips connection parts and does request straight away. So its a pro.

Viewing 5 replies - 1 through 5 (of 5 total)
  • What you’re describing is the default behaviour. The only time you’d need to set CURLOPT_FORBID_REUSE is if you wanted to disable that behaviour. WordPress does not do that, if that’s what you’re asking.

    Thread Starter juslintek

    (@juslintek)

    Well I’ve provided with false :-). Too bad it doesn’t it should, would save resources on while requesting same URL and could do check on URL, if URL is different to previous then connection should be reinitialized. Although I think that happens automatically if URL is different.

    You seem to have misunderstood me. There’s no reason to set CURLOPT_FORBID_REUSE in WordPress to false, because it’s already false. The default is false, so manually setting it to false just isn’t doing anything at all.

    Thread Starter juslintek

    (@juslintek)

    Oh, so wordpress is reusing connection, because in curl that uption default value is true.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Do wp_remote_* functions have CURLOPT_FORBID_REUSE’ is closed to new replies.