Refreshing the data source cache via a cron job

Data sources link data tables inserted into your Joomla/Wordpress site with their source (e.g. an Excel file). One way to improve the loading time of the resulting table is to enable the data source cache. Using this option, once the cache is populated with the source data, all subsequent requests for data will be served from the cache, instead of the actual source.

For instance, if the table is linked to a Google spreadsheet document, instead of reading the remote web page and extracting its contents in order to generate the table, the data source will read the data from the database where the cache resides. Obviously this is much faster and requires less resources. The data source will read the table data from the cache until the cache expires, or the user clears the cache manually.

If the cache has expired and a new visitor visits the page that contains the table, the data source will need to fetch again the source data and refresh its memory. Therefore, the first visitor after the cache has expired will wait longer than all subsequent visitors until the cache expires again. If you want to avoid this situation you can schedule the cache refreshment using a cron task. Here is how:

Go to User Preferences and search for the Data Source section. Set the keyphrase parameter and save the changes

Visit again the User Preferences page and copy-past the refresh URL.

This this url to construct your cron job. The actual command varies based on your system configuration, but it should be something similar to:


Moreover, if you want to refresh a specific data source use the URL parameter ds_tag (tag) to specify it:

Important note: This features requires Tabulizer version 6.0.23 or newer