Open ClassFoundation5.9.0
NSCache
class NSCache<KeyType, ObjectType> where KeyType : AnyObject, ObjectType : AnyObject
Superclasses
class NSObject
The root class of most Foundation class hierarchies.
Citizens in Foundation
Conformances
protocol CustomDebugStringConvertible
A type with a customized textual representation suitable for debugging purposes.
protocol CustomStringConvertible
A type with a customized textual representation.
protocol Equatable
A type that can be compared for value equality.
protocol Hashable
A type that can be hashed into a
Hasher
to produce an integer hash value.protocol NSObjectProtocol
The
NSObjectProtocol
groups methods that are fundamental to all Foundation objects.
Members
init(
) var countLimit: Int
var delegate: NSCacheDelegate?
var evictsObjectsWithDiscardedContent: Bool
var name: String
var totalCostLimit: Int
func object(forKey: KeyType
) -> ObjectType? func removeAllObjects(
) func removeObject(forKey: KeyType
) func setObject(ObjectType, forKey: KeyType
) func setObject(ObjectType, forKey: KeyType, cost: Int
)