Open Classswift 6.1.2Foundation
NSCache
class NSCache<KeyType, ObjectType> where KeyType : AnyObject, ObjectType : AnyObjectclass NSCache<KeyType, ObjectType> where KeyType : AnyObject, ObjectType : AnyObjectimport Foundationclass NSObjectThe root class of most Foundation class hierarchies.
protocol CustomDebugStringConvertibleA type with a customized textual representation suitable for debugging purposes.
protocol CustomStringConvertibleA type with a customized textual representation.
protocol EquatableA type that can be compared for value equality.
protocol Hashable : EquatableA type that can be hashed into a Hasher to produce an integer hash value.
protocol NSObjectProtocol : AnyObjectThe NSObjectProtocol groups methods that are fundamental to all Foundation objects.
override init() var countLimit: Intweak var delegate: (any NSCacheDelegate)?var evictsObjectsWithDiscardedContent: Boolvar name: Stringvar totalCostLimit: Intfunc object(forKey key: KeyType) -> ObjectType? func removeAllObjects() func removeObject(forKey key: KeyType) func setObject(_ obj: ObjectType, forKey key: KeyType) func setObject(_ obj: ObjectType, forKey key: KeyType, cost g: Int)