Name
-
This notification will be sent when the disk cache got cleaned either there are cached files expired or the total size exceeding the max allowed size. The manually invoking of
clearDiskCache
method will not trigger this notification.The
object
of this notification is theImageCache
object which sends the notification.A list of removed hashes (files) could be retrieved by accessing the array under
KingfisherDiskCacheCleanedHashKey
key inuserInfo
of the notification object you received. By checking the array, you could know the hash codes of files are removed.The main purpose of this notification is supplying a chance to maintain some necessary information on the cached files. See this wiki for a use case on it.
Declaration
Swift
public static var KingfisherDidCleanDiskCache = Notification.Name.init("com.onevcat.Kingfisher.KingfisherDidCleanDiskCache")