src/Config/Adapter/Apollo.php
public function refresh($force = false) {
		if (!$force && time() - $this->last_fetch < $this->config['refresh_interval']) {
			return;
		}
		$clis = [];
		foreach ($this->conf['namespace'] as $v) {
			$clis[] = $this->getClient($v);
		}
		foreach ($clis as $cli) {
			$cli->recv();
			if ($cli->statusCode === 304) {
				continue;
			}
			$res = json_decode($cli->body, true);
			$ns = $res['namespaceName'];
			$this->last_key[$ns] = $res['releaseKey'];
			$this->update($ns, $res['configurations']);
		}
		$this->last_fetch = time();
	}
public function refresh($force = false) {
		if (!$force && time() - $this->last_fetch < $this->config['refresh_interval']) {
			return;
		}
		$clis = [];
		foreach ($this->conf['namespace'] as $v) {
			$clis[] = $this->getClient($v);
		}
		foreach ($clis as $cli) {
			$cli->recv();
			if ($cli->statusCode === 304) {
				continue;
			}
			$res = json_decode($cli->body, true);
			$ns = $res['namespaceName'];
			$this->last_key[$ns] = $res['releaseKey'];
			$this->update($ns, $res['configurations']);
		}
		$this->last_fetch = time();
	}
public function refresh ( $ force = false ) { if ( ! $ force && time ( ) - $ this -> last_fetch < $ this -> config [ 'refresh_interval' ] ) { return ; } $ clis = [ ] ; foreach ( $ this -> conf [ 'namespace' ] as $ v ) { $ clis [ ] = $ this -> getClient ( $ v ) ; } foreach ( $ clis as $ cli ) { $ cli -> recv ( ) ; if ( $ cli -> statusCode === 304 ) { continue ; } $ res = json_decode ( $ cli -> body , true ) ; $ ns = $ res [ 'namespaceName' ] ; $ this -> last_key [ $ ns ] = $ res [ 'releaseKey' ] ; $ this -> update ( $ ns , $ res [ 'configurations' ] ) ; } $ this -> last_fetch = time ( ) ; }
Refresh all configs

@access public
@param bool $force Is force refresh or not
Refresh all configs