Skip to main content

Return to TX Community

Liaison

Application PDF Caching Overview

The Application Review Tool allows Admins to enable application PDF caching for faster load times within the Application Review Tool Application Reader.

The Application Reader displays the Visualforce documents and object record attachments defined for the relevant Application Review Type.  

This process requires documents to be downloaded from Salesforce, converted to PDF (if necessary), merged into one PDF document, and indexed to allow searches. The size andnumber of attachments can cause this process to load slowly.

Application PDF Caching runs all these processes in advance and saves the newly processed PDF on an Application Cache record. Because the number of processes is reduced to simply downloading the cache record, the load time of the application PDF is improved.

The TargetX PDF Cache page allows a user to run a job to add PDF caches on demand and to schedule PDF cache jobs. Access the page via Setup and search for Visualforce pages. Select the CacheAdmin page by clicking .


How Application PDF Caching Works

Note: Performance may vary based on network speed and routing to Salesforce from different geolocations.

The details of how Application PDF Caching works include the following:

  1. Caches are created for any Application with an Application Review Type with the Cache Enabled checkbox checked.
  2. Caching is scheduled by selecting one of the schedule options on the TargetX PDF Cache page. 
    1. This schedules an apex job to cache PDFs based on the frequency chosen.
    2. The apex job does the following:
      1. For Application records with no cache record:
        • Creates an Application Review Cache record on all Application records with an Application Review Type that has cache enabled.
        • Creates an application cache attachment for each Application Cache record.
      2. For Application records with an existing cache record:
        • Updates the cache if the Application record has been modified or if a new attachment has been added to an object included in the Application Review Type document definition.
        • Removes the Application Review Cache record if:
          • The Disable Cache checkbox on the Application record is checked.
          • The Cache Enabled checkbox on the Application Review Type record is unchecked.
    3. In addition to the scheduled batch, caches can be created on demand by selecting the Start Batch button on the TargetX PDF Cache page.

Notes: 

  • Adding new attachments to the Application or other objects included in the Application Review Type document definition will trigger a new cache to be created. 
    • This will re-generate attachments and coversheet data, but NOT the Profile page. To re-generate the profile page, you must delete the Application Cache record and re-run the PDF Cache Batch process.
  • Errors that occur during document conversion will display a warning message to the user along with a link to the original document. The reader may still be able to display the document even if an error has occurred.

Cache Admin Page

The Cache Admin Page offers the following options for PDF caching:

TargetX PDF Cache Admin Page.png

Schedule Hourly Batch: runs every hour on the hour.

Schedule 4-Hour Batch: runs at midnight,  4 AM,  8 AM,  12 PM,  4 PM,  and 8 PM based on Org time.

Schedule 8-Hour Batch: runs at midnight,  8 AM,  4 PM based on Org time.

Schedule Daily Batch: runs at midnight based on Org time.

Apex Jobs: The link navigates to the Apex Jobs page where you can monitor the status of Apex jobs.

Scheduled Jobs: The link navigates to the All Scheduled Jobs page which lists all of the jobs scheduled by your users.

Deleting Cache Records

There are two ways to delete cache records:

  1. Set the Disable Cache checkbox on the Application record to true (i.e., checked).

TargetX Application Disable Cache.png

  1. Set the Cache Enabled checkbox on the Application Review Type record to false (i.e., unchecked).

TargetX Rvw Type Cache Enabled.png

Calculating API Calls for Application Review Tool Cache Job

API calls for the cache job are calculated as the number of active assignments + (Number of active assignments x number of attachments included).

Errors

The error message page will display if one or more of the following potential issues were detected:

  • Bad fonts
  • Bad PDF structure/not PDF compliant
  • Physically corrupted
  • Unable to decode something
  • Bad color code

The reader may still be able to display the document even if one of these issues has occurred.


See also:

  • Was this article helpful?