Skip to content

Commit

Permalink
use updateAndGet
Browse files Browse the repository at this point in the history
  • Loading branch information
markvaneijk committed May 9, 2024
1 parent 69be45b commit ffc5452
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/CachedComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ public function resolveView()
return parent::resolveView();
}

if (null !== $cachedValue = $this->get($this->getParameters())) {
return new HtmlString((string) $cachedValue);
}
$cachedValue = $this->get($this->getParameters()) ?: $this->updateAndGet($this->getParameters());

return new HtmlString((string) $cachedValue);
}
}

0 comments on commit ffc5452

Please sign in to comment.