I was looking at the NSCache class and the NSDiscardableContent protocol for an 
LRU-type cache. However the documentation doesn't say anything specific about 
the eviction policy used (apart from setting total cost and count limits), only 
that:

"The NSCache class incorporates various auto-removal policies, which ensure 
that it does not use too much of the system’s memory. The system automatically 
carries out these policies if memory is needed by other applications. When 
invoked, these policies remove some items from the cache, minimizing its memory 
footprint."

Can anyone shed some light on how NSCache decides on which items to evict? 

If this can't be known, can anyone suggest an alternative to NSCache that 
implements an LRU-type eviction policy? Perhaps it might be possible to overlay 
an LRU-type eviction policy by careful implementation of the 
NSDiscardableContent protocol?

Best,
Dalmazio

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to