Enumeration

NSImageCacheMode

Constants that specify the caching policy on a per-image basis.

Declaration

typedef enum NSImageCacheMode : NSUInteger {
    ...
} NSImageCacheMode;

Overview

Set the caching policy using the cacheMode property.

The following table specifies the default caching policy for the various types of image representation.

Image Rep Class

Default caching policy

NSBitmapImageRep

NSImageCacheBySize. Cache if bitmap is 32-bits in 16-bit world or greater than 72 dpi.

NSPICTImageRep

NSImageCacheBySize. Same reasoning as NSBitmapImageRep in the event the PICT contains a bitmap.

NSPDFImageRep

NSImageCacheAlways

NSCIImageRep

NSImageCacheBySize. Cache if the bitmap depth does not match the screen depth or the resolution is greater than 72 dpi.

NSEPSImageRep

NSImageCacheAlways

NSCustomImageRep

NSImageCacheAlways

Topics

Cache Options

NSImageCacheDefault

Caching is unspecified.

NSImageCacheAlways

Always generate a cache when drawing.

NSImageCacheBySize

Cache if the cache size is smaller than the original data.

NSImageCacheNever

Never cache; always draw direct.

See Also

Managing Caching Options

cacheMode

The image’s caching mode.

- recache

Invalidates and frees offscreen caches of all image representations.