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.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software