diff --git a/src/CacheManager.php b/src/CacheManager.php index 76db6369..0f3f19ed 100644 --- a/src/CacheManager.php +++ b/src/CacheManager.php @@ -20,10 +20,15 @@ class CacheManager extends BaseCacheManager */ public function __call($method, $parameters) { - if (! tenancy()->initialized || ! static::$addTags) { - return parent::__call($method, $parameters); + if (tenancy()->initialized && static::$addTags) { + return $this->callWithTag($method, $parameters); } + return parent::__call($method, $parameters); + } + + protected function callWithTag($method, $parameters) + { $tags = [config('tenancy.cache.tag_base') . tenant()?->getTenantKey()]; if ($method === 'tags') {