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 a PSPDFRenderTask in a PSPDFRenderQueue which will then reach out to the cache and check if there are images available before rendering a new one.

    See

    PSPDFRenderTask
    See more

    Declaration

    Objective-C

    
    @interface PSPDFCache : NSObject

    Swift

    class PSPDFCache : 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 more

    Declaration

    Objective-C

    
    @interface PSPDFDiskCache : NSObject

    Swift

    class PSPDFDiskCache : 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 more

    Declaration

    Objective-C

    
    @interface PSPDFMemoryCache : NSObject

    Swift

    class PSPDFMemoryCache : NSObject