Up
Authors
- Generated by Gregory John Casamento,,,
-
Date: Generated at 2023-12-20 19:35:39 -0500
- Declared in:
- Foundation/NSCache.h
Availability: MacOS-X 10.6.0
Description forthcoming.
Method summary
- (
NSUInteger)
countLimit;
Availability: MacOS-X 10.6.0
Returns the maximum number of objects that are
supported by this cache.
- (id)
delegate;
Availability: MacOS-X 10.6.0
Returns the cache's delegate.
- (BOOL)
evictsObjectsWithDiscardedContent;
Availability: MacOS-X 10.6.0
Returns whether objects stored in this cache which
implement the NSDiscardableContent protocol are
removed from the cache when their contents are
evicted.
- (
NSString*)
name;
Availability: MacOS-X 10.6.0
Returns the name associated with this cache.
- (GS_GENERIC_TYPE(ValT))
objectForKey: (GS_GENERIC_TYPE(KeyT))key;
Availability: MacOS-X 10.6.0
Returns an object associated with the specified
key in this cache.
- (void)
removeAllObjects;
Availability: MacOS-X 10.6.0
Removes all objects from this cache.
- (void)
removeObjectForKey: (GS_GENERIC_TYPE(KeyT))key;
Availability: MacOS-X 10.6.0
Removes the object associated with the given
key.
- (void)
setCountLimit: (
NSUInteger)lim;
Availability: MacOS-X 10.6.0
Sets the maximum number of objects permitted in this
cache. This limit is advisory; caches may choose to
disregard it temporarily or permanently. A limit
of 0 is used to indicate no limit; this is the default.
- (void)
setDelegate: (id)del;
Availability: MacOS-X 10.6.0
Sets the delegate for this cache. The delegate will be
notified when an object is being evicted or
removed from the cache.
- (void)
setEvictsObjectsWithDiscardedContent: (BOOL)b;
Availability: MacOS-X 10.6.0
Sets whether this cache will evict objects that
conform to the NSDiscardableContent protocol, or
simply discard their contents.
- (void)
setName: (
NSString*)cacheName;
Availability: MacOS-X 10.6.0
Sets the name for this cache.
- (void)
setObject: (GS_GENERIC_TYPE(ValT))obj
forKey: (GS_GENERIC_TYPE(KeyT))key;
Availability: MacOS-X 10.6.0
Adds an object to the cache without associating a cost
with it.
- (void)
setObject: (GS_GENERIC_TYPE(ValT))obj
forKey: (GS_GENERIC_TYPE(KeyT))key
cost: (
NSUInteger)num;
Availability: MacOS-X 10.6.0
Adds an object and its associated cost. The cache will
endeavor to keep the total cost below the value
set with
-setTotalCostLimit:
by discarding the contents of objects which implement
the NSDiscardableContent protocol.
- (void)
setTotalCostLimit: (
NSUInteger)lim;
Availability: MacOS-X 10.6.0
Sets the maximum total cost for objects stored in this
cache. This limit is advisory; caches may choose to
disregard it temporarily or permanently. A limit
of 0 is used to indicate no limit; this is the default.
- (
NSUInteger)
totalCostLimit;
Availability: MacOS-X 10.6.0
Returns the total cost of all objects held in the
cache.
- Declared in:
- Foundation/NSCache.h
Availability: MacOS-X 10.6.0
Protocol implemented by NSCache delegate objects.
Method summary
- (void)
cache: (
NSCache*)cache
willEvictObject: (id)obj;
Availability: MacOS-X 10.6.0
Delegate method, called just before the
cache removes an object, either as the
result of user action or due to the cache
becoming full.
Up