diff --git a/src/Cacheable.php b/src/Cacheable.php index 76f28c6..741e86e 100644 --- a/src/Cacheable.php +++ b/src/Cacheable.php @@ -63,7 +63,7 @@ public function cache() { } $keyName = $this->getKeyName(); - $keyValue = $this->getCurrentConnection()->getName().'_'.$this->{$keyName}; + $keyValue = $this->getConnection()->getName().'_'.$this->{$keyName}; $tagName = $this->getCacheTagName(); @@ -129,7 +129,7 @@ public static function flush($model = null) { } else { $keyName = $model->getKeyName(); - $keyValue = $model->getCurrentConnection()->getName().'_'.$model->{$keyName}; + $keyValue = $model->getConnection()->getName().'_'.$model->{$keyName}; Cache::tags($tagName)->forget($keyValue);