PSPDFMemoryCache

Objective-C


@interface PSPDFMemoryCache : NSObject

Swift

class MemoryCache : NSObject

The memory cache holds images in memory to give the render engine access to them as fast as possible. By default its memory constraints are configured to get the best performance out of the current device.

The memory cache can be accessed with PSPDFKit.SDK.shared.cache.memoryCache.

  • Unavailable

    Not the designated initializer

    Undocumented

    Declaration

    Objective-C

    PSPDF_EMPTY_INIT_UNAVAILABLE
  • Unavailable

    Not the designated initializer

    Undocumented

    Declaration

    Objective-C

    PSPDF_EMPTY_INIT_UNAVAILABLE
  • Number of objects that are currently in the cache.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSUInteger count;

    Swift

    var count: UInt { get }
  • Tracks the current amount of pixels cached.

    One pixel roughly needs 4 byte (+ structure overhead).

    Declaration

    Objective-C

    @property (nonatomic, readonly) long long numberOfPixels;

    Swift

    var numberOfPixels: Int64 { get }
  • Maximum number of pixels allowed to be cached.

    The default is a device dependent value.

    Declaration

    Objective-C

    @property (nonatomic) long long maxNumberOfPixels;

    Swift

    var maxNumberOfPixels: Int64 { get set }
  • Maximum number of pixels allowed to be cached when the device is under stress (e.g. when a memory warning arrives).

    The default is a device dependent value.

    Declaration

    Objective-C

    @property (nonatomic) long long maxNumberOfPixelsUnderStress;

    Swift

    var maxNumberOfPixelsUnderStress: Int64 { get set }