From da20339181cd253e2dec139217ce20ccf4143cf2 Mon Sep 17 00:00:00 2001 From: simon Date: Tue, 4 Nov 2025 08:39:31 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix:cache=E9=87=8D=E5=A4=8D=E5=BC=95?= =?UTF-8?q?=E7=94=A8=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cmd/eagle/internal/repo/add/template.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cmd/eagle/internal/repo/add/template.go b/cmd/eagle/internal/repo/add/template.go index 6057611d7..35bf8722e 100644 --- a/cmd/eagle/internal/repo/add/template.go +++ b/cmd/eagle/internal/repo/add/template.go @@ -16,7 +16,6 @@ import ( "time" localCache "github.com/go-eagle/eagle/pkg/cache" - cacheBase "github.com/go-eagle/eagle/pkg/cache" "github.com/go-eagle/eagle/pkg/encoding" "github.com/pkg/errors" "github.com/spf13/cast" @@ -125,7 +124,7 @@ func (r *{{.LcName}}Repo) Get{{.Name}}(ctx context.Context, id int64) (ret *mode // read redis cache ret, err = r.cache.Get{{.Name}}Cache(ctx, id) - if errors.Is(err, cacheBase.ErrPlaceholder) { + if errors.Is(err, localCache.ErrPlaceholder) { return nil, gorm.ErrRecordNotFound } else if errors.Is(err, redis.ErrRedisNotFound) { // get data from db From 0ade7d91e74d3fe7e1b7ccbca527a236a15cc1bd Mon Sep 17 00:00:00 2001 From: simon Date: Mon, 24 Nov 2025 16:58:15 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix:repo=E6=9B=B4=E6=96=B0=E9=9C=80?= =?UTF-8?q?=E8=A6=81=E5=88=A0=E9=99=A4localStorage?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cmd/eagle/internal/repo/add/template.go | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/eagle/internal/repo/add/template.go b/cmd/eagle/internal/repo/add/template.go index 35bf8722e..13b56e6aa 100644 --- a/cmd/eagle/internal/repo/add/template.go +++ b/cmd/eagle/internal/repo/add/template.go @@ -102,6 +102,7 @@ func (r *{{.LcName}}Repo) Update{{.Name}}(ctx context.Context, id int64, data *m {{- if .WithCache }} // delete cache _ = r.cache.Del{{.Name}}Cache(ctx, id) + _ = r.localCache.Del(ctx, cast.ToString(id)) {{- end }} return nil }