Skip to content

Commit

Permalink
Update CacheBehavior.php
Browse files Browse the repository at this point in the history
  • Loading branch information
cornernote committed Feb 27, 2018
1 parent bbba259 commit 5c3398c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/CacheBehavior.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,12 @@ public function clearCache($resetCleared = true)
{
// check for recursion
if ($resetCleared) {
$this->_cleared = [];
$this->_cacheKeysCleared = [];
}
if (isset($this->_cleared[$this->cacheKeyPrefixName])) {
if (isset($this->_cacheKeysCleared[$this->cacheKeyPrefixName])) {
return;
}
$this->_cleared[$this->cacheKeyPrefixName] = true;
$this->_cacheKeysCleared[$this->cacheKeyPrefixName] = true;
// clear related cache
foreach ($this->cacheRelations as $cacheRelation) {
$models = is_array($this->owner->$cacheRelation) ? $this->owner->$cacheRelation : [$this->owner->$cacheRelation];
Expand Down

0 comments on commit 5c3398c

Please sign in to comment.