bluele / gcache

An in-memory cache library for golang. It supports multiple eviction policies: LRU, LFU, ARC

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Access to stats?

ianrose14 opened this issue · comments

I see there is a stats.go file with a (private) statsAccessor interface, but I don't see any way to access these stats in the API? Is this just incomplete work?

@ianrose14
Implementation is already completed.
You can access those apis via statsAccessor's interface.
Example is here: https://github.com/bluele/gcache/blob/master/stats_test.go#L138

ah, I see! Any interest in making statsAccessor public? Without that, it is pretty impossible to figure out from the godocs that those methods are available.

That's right.
And currently statsAcessor interface is unnecessary, so I'd like to migrate this interface to the Cache interface.

any update about this issue?