Caching


Caching


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

The CData Connect caching feature allows users to create caching jobs, where CData Connect fetches data for the selected tables on a scheduled basis. 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 runs database queries against the cached data, not the live data.

The Caching page contains a list of caching jobs to run. 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 deletes the associated cached data.

Note: Caching is not available for relational databases.

Incremental Updates

The CData Connect caching feature allows for incremental updates. When you create a caching job, CData Connect 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 can then run the caching job for those rows only. Otherwise, CData Connect 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.

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

  3. Select the datasets from your connection that you want to add to the job. If you select the root connection, all datasets are selected.

    CData Connect 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.

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

    Time Check is for incremental updates only. Choose a column in your table that CData Connect 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 performs full updates only.

  6. Click Confirm to save your job.

    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.