Skip to content

Commit

Permalink
Fixes #81
Browse files Browse the repository at this point in the history
  • Loading branch information
WalterWoshid authored Jun 18, 2024
2 parents 8fb5fcb + dac7e71 commit 164251b
Show file tree
Hide file tree
Showing 2 changed files with 18 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));
$aspectAdviceNames = $this->aspectManager->getAspectAdviceNames();
$aspectHash = md5(serialize($aspectAdviceNames));

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

/**
* Get the aspect advice names.
*
* @return string[]
*/
public function getAspectAdviceNames(): array
{
$aspectAdviceNames = [];
foreach ($this->aspects as $aspect) {
foreach ($this->aspectAdviceContainers[$aspect] as $adviceContainer) {
$aspectAdviceNames[] = $adviceContainer->getName();
}
}
return $aspectAdviceNames;
}

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

0 comments on commit 164251b

Please sign in to comment.