You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 text was updated successfully, but these errors were encountered:
m-lotze
changed the title
Only flush cache, when delete() returns a count
Only flush cache when delete() returns a count
Aug 19, 2022
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.The text was updated successfully, but these errors were encountered: