Only cache a Principal if we've actually loaded something.

This commit is contained in:
Andrew Ruthven 2022-12-17 00:20:43 +13:00 committed by Andrew Ruthven
parent 5db0622d65
commit 7a3486563c

View File

@ -234,7 +234,10 @@ class Principal {
}
$this->assignRowValues($row);
$this->url = ConstructURL( $this->dav_name, true );
$row = $cache->set($this->cacheNs, $this->cacheKey, $row, 864000 );
if (isset($this->cacheNs))
$cache->set($this->cacheNs, $this->cacheKey, $row, 864000 );
return $this;
}