/**
* @inheritdoc
*/
public function get()
{
$function = $this->function;
$now = Clock::now()->getTimestamp();
if ($this->cachedResult === null || $now - $this->lastCallTime > $this->expireTime) {
$this->cachedResult = $function();
$this->lastCallTime = $now;
}
return $this->cachedResult;
}