bluele / gcache

An in-memory cache library for golang. It supports multiple eviction policies: LRU, LFU, ARC
MIT License
2.6k stars 271 forks source link

Access to stats? #45

Open ianrose14 opened 6 years ago

ianrose14 commented 6 years ago

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?

bluele commented 6 years ago

@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

ianrose14 commented 6 years ago

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.

bluele commented 6 years ago

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

eaglerayp commented 5 years ago

any update about this issue?