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

Add dynamic size to ARC #79

Open yonderblue opened 3 years ago

yonderblue commented 3 years ago

I'm sure this isn't quite right in the implementation, any pointers would be appreciated. After the implementation is correct I can see about getting it hooked into the other caches and doc etc, if it is a feature that is desired @bluele?

Also in case it isn't clear, the intent is to be able to have not a fixed size of items in the cache but instead bounded to a size that might be representative of the amount of data in the cache, where each item added could have varying data size.