Closed canndrew closed 8 years ago
!00% agree here. [EDIT] Only adding the iter()
should not reset any last seen time
I just noticed that the TODO list in the README already says this.
There's now a method peek_iter
which returns an iterator (that doesn't update timestamps), so I think this can be closed.
Thank you, @andrebeat! With #77 merged, I'm closing this now.
It's odd that
LruTimeCache
has a method to clone all it's elements out into aVec
. Standard library collections don't have methods like this. To clone aHashMap
into aVec
you'd write:Although if someone did this in practice (rather than just using the iterator) they'd probably be doing something wrong.
LruTimeCache
's API should be changed to mirror that ofHashMap
as closely as is appropriate.