kpango / gache

fastest lockfree cache library for go application

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Maybe we do not need a global instance of gache?

kevindiu opened this issue · comments

Same as topic.

gache/gache.go

Line 89 in b5c48d4

instance *gache

or maybe we can just remove init() function?

I think we can remove init function.
But if we delete init function user should call GetGache function to use gache's global instance. May be it makes some problem for current user

If we do that we have to publish this release as a major release.
I prefer left init function for backward compatibility

Lets wait for golang2 generic support and include this change together 😁