Skip to content

Commit 67338dc

Browse files
authored
fix:cache重复引用修复 (#203)
1 parent dafa4bd commit 67338dc

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

cmd/eagle/internal/repo/add/template.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import (
1616
"time"
1717
1818
localCache "github.com/go-eagle/eagle/pkg/cache"
19-
cacheBase "github.com/go-eagle/eagle/pkg/cache"
2019
"github.com/go-eagle/eagle/pkg/encoding"
2120
"github.com/pkg/errors"
2221
"github.com/spf13/cast"
@@ -125,7 +124,7 @@ func (r *{{.LcName}}Repo) Get{{.Name}}(ctx context.Context, id int64) (ret *mode
125124
126125
// read redis cache
127126
ret, err = r.cache.Get{{.Name}}Cache(ctx, id)
128-
if errors.Is(err, cacheBase.ErrPlaceholder) {
127+
if errors.Is(err, localCache.ErrPlaceholder) {
129128
return nil, gorm.ErrRecordNotFound
130129
} else if errors.Is(err, redis.ErrRedisNotFound) {
131130
// get data from db

0 commit comments

Comments
 (0)