NSCache vs custom LRU
NSCache exists, so why do image libraries write their own LRU cache?
NSCache exists, so why do image libraries write their own LRU cache?
NSCache is thread safe and empties itself under memory pressure, but its eviction policy isn't documented, so it doesn't guarantee LRU and you can't control it, and libraries want a predictable policy, a disk layer, expiry, and measurement.
CS fundamentals and algorithmsShort answerAdvanced
You need to write an in-memory image cache with LRU eviction yourself. Which data…
#nscache #lru #linked-list #image-cache
PersistenceMultiple choiceBasics
You picked LRU for an image cache. Select all the correct statements about LRU.
#lru #linked-list
CS fundamentals and algorithmsShort answerAdvanced
You've implemented an LRU cache and the interviewer follows up: "Now make each entry…
#lru #linked-list
NetworkingShort answerAdvanced
In a coding interview you're asked to build, in 30 minutes, an ImageManager that fetches…
#nscache #image-cache