fix(with): 修复 memory.go 中的配置初始化错误
将 bigcache.Config 结构体实例改为指针传递,确保配置能够正确初始化和传递。
This commit is contained in:
parent
257f0a6b6e
commit
f70f8d94db
|
@ -11,7 +11,7 @@ import (
|
||||||
|
|
||||||
func Memory(cli *bigcache.BigCache, opts *bigcache.Config) {
|
func Memory(cli *bigcache.BigCache, opts *bigcache.Config) {
|
||||||
if opts == nil {
|
if opts == nil {
|
||||||
opts = bigcache.Config{
|
opts = &bigcache.Config{
|
||||||
Shards: 1024,
|
Shards: 1024,
|
||||||
LifeWindow: 10 * time.Minute,
|
LifeWindow: 10 * time.Minute,
|
||||||
CleanWindow: 5 * time.Minute,
|
CleanWindow: 5 * time.Minute,
|
||||||
|
|
Loading…
Reference in New Issue