From f70f8d94db12ae07d7422c6940ab5efc2ce4474a Mon Sep 17 00:00:00 2001 From: yanweidong Date: Sat, 20 Sep 2025 11:32:24 +0800 Subject: [PATCH] =?UTF-8?q?fix(with):=20=E4=BF=AE=E5=A4=8D=20memory.go=20?= =?UTF-8?q?=E4=B8=AD=E7=9A=84=E9=85=8D=E7=BD=AE=E5=88=9D=E5=A7=8B=E5=8C=96?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将 bigcache.Config 结构体实例改为指针传递,确保配置能够正确初始化和传递。 --- with/memory.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/with/memory.go b/with/memory.go index 85ce176..2236fc7 100644 --- a/with/memory.go +++ b/with/memory.go @@ -11,7 +11,7 @@ import ( func Memory(cli *bigcache.BigCache, opts *bigcache.Config) { if opts == nil { - opts = bigcache.Config{ + opts = &bigcache.Config{ Shards: 1024, LifeWindow: 10 * time.Minute, CleanWindow: 5 * time.Minute,