Skip to content

Commit

Permalink
feat: decrease query count by cacheing some RDF property fields
Browse files Browse the repository at this point in the history
  • Loading branch information
Makar Sichevoi committed Nov 3, 2023
1 parent 6192666 commit b3249be
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions core/kernel/classes/class.Property.php
Original file line number Diff line number Diff line change
Expand Up @@ -304,9 +304,10 @@ public function getWidget()
*/
public function isLgDependent(): bool
{
if ($this->supportCache() && $this->getModel()->getCache()->has(
$this->generateIsLgDependentKey($this->getUri())
)) {
if (
$this->supportCache()
&& $this->getModel()->getCache()->has($this->generateIsLgDependentKey($this->getUri()))
) {
return (bool)$this->getModel()->getCache()->get($this->generateIsLgDependentKey($this->getUri()));
}

Expand Down Expand Up @@ -344,9 +345,10 @@ public function setLgDependent($isLgDependent): void
*/
public function isMultiple(): bool
{
if ($this->supportCache() && $this->getModel()->getCache()->has(
$this->generateIsMultipleKey($this->getUri())
)) {
if (
$this->supportCache()
&& $this->getModel()->getCache()->has($this->generateIsMultipleKey($this->getUri()))
) {
return (bool)$this->getModel()->getCache()->get($this->generateIsMultipleKey($this->getUri()));
}

Expand Down

0 comments on commit b3249be

Please sign in to comment.