Skip to content

Commit

Permalink
Fixes #81
Browse files Browse the repository at this point in the history
  • Loading branch information
HighLiuk committed Jun 18, 2024
1 parent 8fb5fcb commit bafa242
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Core/Cache/CacheStateManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ protected function getHash(): string
{
$transformerHash = parent::getHash();

$aspects = $this->aspectManager->getAspects();
$aspectHash = md5(serialize($aspects));
$advices = $this->aspectManager->getAdvices();
$aspectHash = md5(serialize($advices));

return $transformerHash . $aspectHash;
}
Expand Down
10 changes: 10 additions & 0 deletions src/Core/Container/AspectManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,16 @@ public function getAspectAdviceContainers(): array
return $this->aspectAdviceContainers;
}

/**
* Get the advice names.
*
* @return string[]
*/
public function getAdvices(): array
{
return array_keys($this->adviceContainers);
}

/**
* Get the advice containers by advice names.
*
Expand Down

0 comments on commit bafa242

Please sign in to comment.