feat: cache optimize

pull/1329/head
withchao 2 years ago
parent a736022c8e
commit 32c49d1b75

@ -17,8 +17,6 @@ package third
import ( import (
"context" "context"
"fmt" "fmt"
"github.com/OpenIMSDK/tools/errs"
"github.com/OpenIMSDK/tools/mw/specialerror"
"net/url" "net/url"
"time" "time"
@ -80,12 +78,12 @@ func Start(client discoveryregistry.SvcDiscoveryRegistry, server *grpc.Server) e
if err != nil { if err != nil {
return err return err
} }
specialerror.AddErrHandler(func(err error) errs.CodeError { //specialerror.AddErrHandler(func(err error) errs.CodeError {
if o.IsNotFound(err) { // if o.IsNotFound(err) {
return errs.ErrRecordNotFound // return errs.ErrRecordNotFound
} // }
return nil // return nil
}) //})
third.RegisterThirdServer(server, &thirdServer{ third.RegisterThirdServer(server, &thirdServer{
apiURL: apiURL, apiURL: apiURL,
thirdDatabase: controller.NewThirdDatabase(cache.NewMsgCacheModel(rdb), db), thirdDatabase: controller.NewThirdDatabase(cache.NewMsgCacheModel(rdb), db),

Loading…
Cancel
Save