Skip to content

Commit

Permalink
Merge pull request #109 from yhbyun/patch1
Browse files Browse the repository at this point in the history
Fix allowedCache method
  • Loading branch information
andersao committed Dec 24, 2015
2 parents 2bfbf3a + 1c9138a commit 59f773d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Prettus/Repository/Traits/CacheableRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ protected function allowedCache($method)
$cacheExcept = isset($this->cacheExcept) ? $this->cacheExcept : config('repository.cache.allowed.except',null);

if ( is_array($cacheOnly) ) {
return isset($cacheOnly[$method]);
return in_array($method, $cacheOnly);
}

if ( is_array($cacheExcept) ) {
Expand Down Expand Up @@ -265,4 +265,4 @@ public function getByCriteria(CriteriaInterface $criteria)

return $value;
}
}
}

0 comments on commit 59f773d

Please sign in to comment.