Skip to content

MaxSize #13

@hinego

Description

@hinego
	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)

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions