Showing posts with label evictsObjectsWithDiscardedContent. Show all posts
Showing posts with label evictsObjectsWithDiscardedContent. Show all posts

Tuesday, May 7, 2013

NSCache evictsObjectsWithDiscardedContent example ios


evictsObjectsWithDiscardedContent

Returns whether or not the cache will automatically evict discardable-content objects whose content has been discarded.
- (BOOL)evictsObjectsWithDiscardedContent
Return Value of [NSCache evictsObjectsWithDiscardedContent]
YES if the cache will evict the object after it is discarded; otherwise, NO.
Discussion
By default, evictsObjectsWithDiscardedContent is set to YES.
Example of [NSCache evictsObjectsWithDiscardedContent]
   _cellCache = [[NSCache alloc] init];
   [_cellCache setDelegate:self];
   [_cellCache setEvictsObjectsWithDiscardedContent:NO];