Instance Method

cache(_:willEvictObject:)

Called when an object is about to be evicted or removed from the cache.

Declaration

optional func cache(_ cache: NSCache<AnyObject, AnyObject>, willEvictObject obj: Any)

Parameters

cache

The cache with which the object of interest is associated.

obj

The object of interest in the cache.

Discussion

It is not possible to modify cache from within the implementation of this delegate method.