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');
?>
Error handling (Previous) Custom HTTP adapters (Next)
Last updated: Thu, 23 May 2013 — 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.