Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MaxSize #13

Open
hinego opened this issue Mar 31, 2023 · 1 comment
Open

MaxSize #13

hinego opened this issue Mar 31, 2023 · 1 comment

Comments

@hinego
Copy link

hinego commented Mar 31, 2023

	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)

是否考虑将文档完善一下?

@asjdf
Copy link
Owner

asjdf commented Mar 31, 2023

指cache的容量,目前没有时间更新文档,欢迎提交pr来协助更新文档

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants