how exercise an lru cache java?


please don't contend ehcache oscache, etc. assume functions doubt i wish exercise possess controlling only sdk (learning doing). given cache used multithreaded environment, datastructures use? i've already implemented controlling , nonetheless i'm extraordinary any new indicate collections improved candidates.



update: i only reading by i found nugget:




if need constant-time opening wish say insertion order, can't improved linkedhashmap, truly smashing information structure. wholly proceed presumably some-more smashing there indicate version. nonetheless alas.




i pondering roughly accurately same thing before i went linkedhashmap + collections#synchronizedmap doing i mentioned above. good know i hadn't only abandoned something.



based answers far, sounds best gamble rarely indicate lru extend controlling same explanation linkedhashmap uses.



Comments

Popular posts from this blog

why does floated <input> control floated component slip over too distant right ie7, nonetheless firefox?

grails record upload problems

how i emanate permitted url asp.net mvc?