private static function getTokenFromCache($name) {
    $success = false;
    $result = apc_fetch($name, $success);
    if ($success && time() < $result['eviction_time_epoch']) {
      unset($result['eviction_time_epoch']);
      return $result;
    }
    $memcache = new \Memcache();
    $result = $memcache->get($name);
    // If there was a result in memcache but not in apc we can add using a
    // short timeout.
    if ($result !== false) {
      self::putTokenInApc($name, $result, $result['expiration_time']);
    }
    return $result;
  }
private static function getTokenFromCache($name) {
    $success = false;
    $result = apc_fetch($name, $success);
    if ($success && time() < $result['eviction_time_epoch']) {
      unset($result['eviction_time_epoch']);
      return $result;
    }
    $memcache = new \Memcache();
    $result = $memcache->get($name);
    // If there was a result in memcache but not in apc we can add using a
    // short timeout.
    if ($result !== false) {
      self::putTokenInApc($name, $result, $result['expiration_time']);
    }
    return $result;
  }
private static function getTokenFromCache ( $ name ) { $ success = false ; $ result = apc_fetch ( $ name , $ success ) ; if ( $ success && time ( ) < $ result [ 'eviction_time_epoch' ] ) { unset ( $ result [ 'eviction_time_epoch' ] ) ; return $ result ; } $ memcache = new \ Memcache ( ) ; $ result = $ memcache -> get ( $ name ) ; // If there was a result in memcache but not in apc we can add using a // short timeout. if ( $ result !== false ) { self :: putTokenInApc ( $ name , $ result , $ result [ 'expiration_time' ] ) ; } return $ result ; }
Retrieve an access token from the cache.

@param $name String name of the token to retrieve.

@return mixed The value of the token if it is stored in the cache,
otherise false.

@access private
Retrieve an access token from the cache .