Closed floatdrop closed 1 year ago
It works the other way around; simplelru is used by other implementations (2Q, ARC) so provides an interface to those implementations in case there are different desired implementations of simplelru. Certainly more functions could be added but at the moment the simplelru.LRUCache interface is not intended for end users, instead the interface/capabilities of the various user-facing implementations are for direct use.
Currently building next code:
Fails as
*lru.ARCCache
does not implements parts ofsimplelru.LRUCache
:wrong type for Add method
[missing bool return]missing GetOldest method
wrong type for Remove method
[missing bool return]missing RemoveOldest method
missing Resize method
Is it reasonable to fix these mismatches to comply declared interface?