public function refreshCache() { DB::transaction(function () { $this->setTopicsCountCache(); $this->setPostsCountCache(); $this->setLastPostCache(); $this->save(); }); }