Skip to content

Commit

Permalink
Merge pull request #8 from AuthentikCanada/feat/handle-multiple-db-co…
Browse files Browse the repository at this point in the history
…nnection

Feat/handle multiple db connection
  • Loading branch information
njanik authored Apr 21, 2023
2 parents 56287ff + 471bf3c commit 54735d8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Cacheable.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function cache() {
}

$keyName = $this->getKeyName();
$keyValue = $this->{$keyName};
$keyValue = $this->getCurrentConnection()->getName().'_'.$this->{$keyName};

$tagName = $this->getCacheTagName();

Expand Down Expand Up @@ -129,7 +129,8 @@ public static function flush($model = null) {
} else {

$keyName = $model->getKeyName();
$keyValue = $model->{$keyName};
$keyValue = $model->getCurrentConnection()->getName().'_'.$model->{$keyName};


Cache::tags($tagName)->forget($keyValue);

Expand Down

0 comments on commit 54735d8

Please sign in to comment.