Skip to content

Commit

Permalink
Added dns cache option
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffhodsdon committed Mar 31, 2010
1 parent 63e65a0 commit 1ea9a3c
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 5 deletions.
7 changes: 7 additions & 0 deletions Services/Facebook.php
Expand Up @@ -69,6 +69,13 @@ class Services_Facebook
*/
protected $useSessionSecret = false;

/**
* Use curl CURLOPT_DNS_USE_GLOBAL_CACHE option
*
* @var bool $useDnsCache Bool switch to use the curl dns cache option
*/
static public $useDnsCache = false;

/**
* Timeout
*
Expand Down
1 change: 1 addition & 0 deletions Services/Facebook/Common.php
Expand Up @@ -124,6 +124,7 @@ protected function sendRequest(array $args)
curl_setopt($ch, CURLOPT_POSTFIELDS, $args);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, Services_Facebook::$timeout);
curl_setopt($ch, CURLOPT_DNS_USE_GLOBAL_CACHE, Services_Facebook::$useDnsCache);
$response = curl_exec($ch);

if (curl_errno($ch)) {
Expand Down
25 changes: 20 additions & 5 deletions package.xml
Expand Up @@ -23,9 +23,9 @@
<active>yes</active>
</developer>
<date>2010-03-31</date>
<time>17:00:06</time>
<time>18:27:51</time>
<version>
<release>0.2.12</release>
<release>0.2.13</release>
<api>0.2.0</api>
</version>
<stability>
Expand All @@ -34,11 +34,11 @@
</stability>
<license uri="http://www.opensource.org/licenses/bsd-license.php">New BSD License</license>
<notes>
*Corrected typo with Validate dependency Refs #17212
* Added useDnsCache option to curl requests
</notes>
<contents>
<dir baseinstalldir="/" name="/">
<file baseinstalldir="/" md5sum="5c6bac98d26575444459cd88d7247bec" name="Services/Facebook.php" role="php">
<file baseinstalldir="/" md5sum="07dbbad91be53f9ade28988fa5653337" name="Services/Facebook.php" role="php">
<tasks:replace from="@package-version@" to="version" type="package-info" />
</file>
<file baseinstalldir="/" md5sum="e944909217d44cbfc2e8e2d75ce70629" name="Services/Facebook/Admin.php" role="php">
Expand All @@ -53,7 +53,7 @@
<file baseinstalldir="/" md5sum="7dd96a24bebad392080951d11154c0ac" name="Services/Facebook/Batch.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
<file baseinstalldir="/" md5sum="2aa4b01ee27fd7cc5179fbd2079ae3bc" name="Services/Facebook/Common.php" role="php">
<file baseinstalldir="/" md5sum="b4b7ae739b876013b61e69342cfe0cf8" name="Services/Facebook/Common.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
<file baseinstalldir="/" md5sum="7cfad9ef4f40c637823cc29af7f62d76" name="Services/Facebook/Connect.php" role="php">
Expand Down Expand Up @@ -335,5 +335,20 @@
*Corrected typo with Validate dependency Refs #17212
</notes>
</release>
<release>
<version>
<release>0.2.13</release>
<api>0.2.0</api>
</version>
<stability>
<release>alpha</release>
<api>alpha</api>
</stability>
<date>2010-03-31</date>
<license uri="http://www.opensource.org/licenses/bsd-license.php">New BSD License</license>
<notes>
* Added useDnsCache option to curl requests
</notes>
</release>
</changelog>
</package>

0 comments on commit 1ea9a3c

Please sign in to comment.