diff --git a/src/Traits/HasConsent.php b/src/Traits/HasConsent.php index 05eb33d..f7867c6 100644 --- a/src/Traits/HasConsent.php +++ b/src/Traits/HasConsent.php @@ -125,7 +125,7 @@ public function activeConsents() public function hasRequiredConsents() { // Define a unique cache key based on identifiable attributes including the model class - $cacheKey = 'user_consent_'.class_basename($this).'-'.$this->getKey(); + $cacheKey = 'user_consent_'.class_basename($this).'_'.$this->getKey(); // Retrieve from cache or calculate if not cached return Cache::tags(['user-consents'])->rememberForever($cacheKey, function () {