setEvictsObjectsWithDiscardedContent:
Sets whether the cache will automatically evict
NSDiscardableContent
objects after the object’s content has been discarded.
- (void)setEvictsObjectsWithDiscardedContent:(BOOL)b
Parameters
- b
- If
YES
, the cache evictsNSDiscardableContent
objects after the object’s contents has been discarded; ifNO
the cache does not evict these objects.
Example of [NSCache setEvictsObjectsWithDiscardedContent]
_cellCache = [[NSCache alloc] init];
[_cellCache setDelegate:self];
[_cellCache setEvictsObjectsWithDiscardedContent :NO];