feat(cache): implement cache clearing for node operations and add delete methods

This commit is contained in:
Chang lue Tsen
2025-09-27 11:24:29 -04:00
parent d2ca3eb961
commit 64f0bcc55a
6 changed files with 60 additions and 6 deletions
@@ -111,5 +111,10 @@ func (l *UpdateServerLogic) UpdateServer(req *types.UpdateServerRequest) error {
return errors.Wrapf(xerr.NewErrCode(xerr.DatabaseUpdateError), "update server error: %v", err.Error())
}
return nil
return l.svcCtx.NodeModel.ClearNodeCache(l.ctx, &node.FilterNodeParams{
Page: 1,
Size: 1000,
ServerId: []int64{req.Id},
Search: "",
})
}