Checking if the tags() method exists when flushing

parent 2541e53f
......@@ -163,7 +163,13 @@ abstract class BaseCacheDecorator implements BaseRepository
*/
public function clearCache()
{
return $this->cache->tags($this->entityName)->flush();
$store = $this->cache;
if (method_exists($this->cache->getStore(), 'tags')) {
$store = $store->tags($this->entityName);
}
return $store->flush();
}
/**
......
......@@ -4,6 +4,7 @@ versions:
changed:
- Define the warning callback on the SetAppKey
- Cleaner <code>BaseCacheDecorator</code> class with a new <code>remember</code> function
- Checking if the tags() method exists when flushing
"3.3.0":
changed:
- Updating vue-simple-mde to avoid 'marked' warning with vuejs 2.5
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment