Caching

With caching, the retrieved host-meta files will be stored locally, which leads to faster lookup times when the same identifier (email address) is loaded again, and when another identifier on the same host is retrieved.

You should use caching when your application often does WebFinger requests. It reduces the number of HTTP requests 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');
?>
    Поддержать сайт на родительском проекте КГБ