From 0a84914e3f931d07f393b9fbe89a073d7a71de29 Mon Sep 17 00:00:00 2001 From: Nicolas Janik Date: Fri, 21 Apr 2023 11:37:58 -0400 Subject: [PATCH] fix/wrong method name --- src/Cacheable.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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);