return cache.NewGorm2Cache(&config.CacheConfig{
CacheLevel: config.CacheLevelOnlyPrimary,
CacheStorage: storage.NewGcache(gcache.New(1000)),
Tables: []string{},
InvalidateWhenUpdate: true, // when you create/update/delete objects, invalidate cache
CacheTTL: 5000, // 5000 ms
CacheMaxItemCnt: 50, // if length of objects retrieved one single time
// exceeds this number, then don't cache
})
这里的 gcache.New(1000) 1000指的是什么 我看NewMem也有这个选项(默认也是1000)
是否考虑将文档完善一下?