Refactor peer resolution logic and add sync interval setting
This commit is contained in:
parent
ab03439e04
commit
9dd8c39ce1
4 changed files with 88 additions and 31 deletions
|
@ -7,12 +7,14 @@
|
|||
private int $maxSigningKeys;
|
||||
private int $sessionInactivityExpires;
|
||||
private int $imageCaptchaExpires;
|
||||
private int $peerSyncInterval;
|
||||
|
||||
public function __construct(array $data)
|
||||
{
|
||||
$this->maxSigningKeys = $data['max_signing_keys'];
|
||||
$this->sessionInactivityExpires = $data['session_inactivity_expires'];
|
||||
$this->imageCaptchaExpires = $data['image_captcha_expires'];
|
||||
$this->peerSyncInterval = $data['peer_sync_interval'];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -46,4 +48,14 @@
|
|||
{
|
||||
return $this->imageCaptchaExpires;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the maximum amount of seconds before the external peer resolve cache is considered expired
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getPeerSyncInterval(): int
|
||||
{
|
||||
return $this->peerSyncInterval;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue