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

ARC.Len() and ARC.GetAll() returns expired item/count #17

Closed fogywang closed 7 years ago

fogywang commented 8 years ago

First, thanks for the contributors to provide expirable cache on LRU/LFU/ARC.

Here's an issue I encounter while using ARC cache: After items in ARC cache being all expired (confirmed that Get() cannot get any value), Len() still returns the length as if items weren't expired. Same as GetAll(), it returns a map containing items that are supposed to be all expired.

bluele commented 7 years ago

Thanks. Let me check the issue.

bluele commented 7 years ago

This issue is fixed by #18