diff --git a/src/Core/Cache/CacheStateManager.php b/src/Core/Cache/CacheStateManager.php index fe19c23..1b667b0 100644 --- a/src/Core/Cache/CacheStateManager.php +++ b/src/Core/Cache/CacheStateManager.php @@ -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; } diff --git a/src/Core/Container/AspectManager.php b/src/Core/Container/AspectManager.php index 7021cbd..72c51eb 100644 --- a/src/Core/Container/AspectManager.php +++ b/src/Core/Container/AspectManager.php @@ -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. *