We're updating the issue view to help you get more done. 

It appears that TTL cache exhibits quadratic performance (+ its evict is buggy)

Description

The library looks useful, thanks!

I looked at the code, and unless I'm mistaken, every cache miss seems to result in a full pass over the entire cache to evict old entries. The performance implications of this would be unacceptable for my target application. Replacing the TTL data structure with a persistent analog of a LinkedHashMap and using a take-while instead could fix this problem.

Also, evict seems to pass the cache in twice, rather than the cache and the TTL...

Environment

None

Status

Assignee

Sean Corfield

Reporter

Jason Wolfe

Labels

None

Approval

None

Patch

None

Priority

Critical