Caching


Caching


The Caching page enables you to manage and run caching jobs.

With the CData Connect Cloud caching feature, users select tables to be cached, or saved to a database. CData Connect Cloud then fetches data for the selected tables on a scheduled basis, ensuring swift and reliable access to data whenever you need it. This allows for increased performance of data connections, since some drivers can be slow retrieving live data.

Note that when you enable caching of data, CData Connect Cloud runs database queries against the cached data, not the live data.

The Caching page contains a list of caching jobs to run. For each job, the Caching page displays the full connection and table information, the connection name, the last time the job was run, and the status of the job. You can select multiple jobs to run immediately by selecting the jobs and clicking Run. You can also delete multiple jobs by selecting them and clicking Delete. Note that when you delete jobs, CData Connect Cloud deletes the associated cached data.

The Caching page also allows you to disable a particular caching job, if you want to pause the scheduled job but not delete it. Use the toggle switch in the Status column to enable or disable a job. You cannot run a job manually as long as it is disabled. When a caching job is disabled, any queries of that data will use the live data source.

Note: Caching is not available for relational databases.

Incremental Updates

The CData Connect Cloud caching feature allows for incremental updates, improving performance. When you create a caching job, CData Connect Cloud tries to find date or date+time columns in the database that show which rows are new or have changed since the last run. CData Connect Cloud can then run the caching job for those rows only. Otherwise, CData Connect Cloud runs a full update.

Configuring Caching

Before you can use the caching feature, you need to configure a PostgreSQL database for your cached data.

To add a PostgreSQL connection for your cached data:

  1. Click Setup Cache Connection. The Add PostgreSQL Connection page appears.

  2. Set up authentication for your PostgreSQL connection. See PostgreSQL for detailed instructions.

  3. Click Save & Test to save your connection. You can now cache data to the PostgreSQL database.

You can edit your PostgreSQL connection at any time by clicking Manage Cache Connection. Note that modifying your connection results in the clearing of data already in the cache.

Adding a Job

To add a new job, complete the following steps:

  1. On the Caching page, click Add Job. This action displays the Add Jobs dialog. There are three steps to adding a job: Select Connection, Add Tables, and Schedule Jobs . You can return to any of the previous steps by clicking the step in the header or by clicking Back.

  2. Select a connection from the list of your connections in the dialog (Step 1), and then click Next.

  3. Select the tables from your connection that you want to add to the job (Step 2).

    CData Connect Cloud displays the total number of datasets selected. Then click Next.

  4. Select how often you want the data to be updated, in increments of hours, days, weeks, or months (Step 3).

  5. Select a Cache Scheme (full or incremental) and Time Check.

    Time Check Column is for incremental updates only. Choose a column in your table that CData Connect Cloud can use to determine which rows are new or have changed since the last run. This is typically a date or date+time column.

    Note: If your data does not contain a time check column, CData Connect Cloud performs full updates only.

  6. When you are satisfied with the job you added, click Confirm to save the job. Otherwise, click Back or click one of the previous steps in the header to make changes.

    Your job appears in the caching queue. Each table you selected for a given data connection is saved in the caching queue as a separate job.

Editing a Job

You can modify or delete a job at any time by clicking the edit or delete icons in the list. You can also run a job manually at any time by clicking Run Now.

In the Edit Job page, you can do the following:

  • Change the caching scheme, such as changing full updates to incremental updates.

  • View the run history and status, making sure the job was successful.

  • Change the log verbosity.

  • Run a single job manually. You can run multiple jobs in the main Caching screen.

  • Turn off caching. Note that if you turn off caching, queries go to the live data source until you turn caching back on.

  • Refresh the cache. Refreshing the cache deletes all previously stored data and can take some time to complete.

  • Delete the job. This deletes all the cached data in your database. You can delete multiple jobs in the main Caching screen.