Caching

With caching, all retrieved XRD/JRD files will be stored locally, which leads to faster lookup times when the same identifier (email address) is loaded again.

You should use caching when your application often does WebFinger requests. For older RFC 6415-based webfinger implementations, it reduces the number of HTTP requests to the same server from 2 to 1 for each lookup.

<?php
require_once 'Net/WebFinger.php';
require_once 
'Cache.php';
$wf = new Net_WebFinger();
$wf->setCache(
    new 
Cache('file', array('cache_dir' => sys_get_temp_dir() . '/myapp'))
);
$react $wf->finger('user@example.org');
$openIdProvider $react->get('http://specs.openid.net/auth/2.0/provider');
?>
Error handling (Previous) Custom HTTP adapters (Next)
Last updated: Mon, 28 Jul 2014 — Download Documentation
Do you think that something on this page is wrong? Please file a bug report or add a note.
View this page in:

User Notes:

There are no user contributed notes for this page.