Cache
-
The
PSPDFCache
is responsible for managing the memory and disk cache of rendered images.Usually you do not access any methods of
PSPDFCache
directly but instead schedule aPSPDFRenderTask
in aPSPDFRenderQueue
which will then reach out to the cache and check if there are images available before rendering a new one.See
PSPDFRenderTaskDeclaration
Objective-C
@interface PSPDFCache : NSObject
Swift
class PDFCache : NSObject
-
The disk cache persists its metadata on disk together with the images and provides cached images even after the app restarts.
The disk cache is designed to store and fetch images, including metadata, in a fast way. No actual images will be held in memory (besides during the time they are scheduled for writing to disk).
See moreDeclaration
Objective-C
@interface PSPDFDiskCache : NSObject
Swift
class DiskCache : 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.
See moreDeclaration
Objective-C
@interface PSPDFMemoryCache : NSObject
Swift
class MemoryCache : NSObject