/**
* @Flow\Around("method(Neos\Neos\Domain\Repository\DomainRepository->findOneByActiveRequest())")
* @param JoinPointInterface $joinPoint The current join point
* @return mixed
*/
public function cacheDomainForActiveRequest(JoinPointInterface $joinPoint)
{
if ($this->domainForActiveRequest === false || $this->environment->getContext()->isTesting()) {
$domain = $joinPoint->getAdviceChain()->proceed($joinPoint);
$this->domainForActiveRequest = $domain;
}
return $this->domainForActiveRequest;
}