The two methods delete and forceDelete in Buildable trait should imho only flush the cache, if the parent methods return an int > 0. Right now, the cache is flushed every time, even when the query did not actually deleted records from the database.
public function delete()
{
$result = parent::delete();
if ($result) {
$this->cache($this->makeCacheTags())->flush();
}
return $result;
}
The two methods
delete
andforceDelete
inBuildable
trait should imho only flush the cache, if the parent methods return an int > 0. Right now, the cache is flushed every time, even when the query did not actually deleted records from the database.