- Inherits From:
- Declared In:
This datastructure does not implement the copying and coding protocols as caches are usually required in the context of algorithms, rather than data storage.
unsigned int size;
size All instance variables are private. entries timestamps
- - initWithCacheSize:
- - addObject:withKey:
- - objectWithKey:
- (void)addObject:(id)newObject withKey:(id)newKey
Adds an entry to the receiver, consisting of newKey and its corresponding value object newObject. For details on the operation please see the discussion in NSDictionary.
- (id)initWithCacheSize:(unsigned int)count
Initialises a newly allocated LRU cache to store count items.
Returns an entry's value given its key, or
nil if no value is associated with aKey.