Extension:External Data/Caching data

You can configure External Data to cache the data retrieved by #get_web_data, #get_soap_data or #get_program_data, both to speed up retrieval of values and to reduce the load on the system whose data is being accessed.

Configuration
To set up caching, run the update.php script. It will create the table.

You should also add a line like the following, to set the expiration time of the cache, in seconds; this example line will cache the data for a week: . This setting can be overridden for a URL, host, second level domain or server-side program.

By default, if data cannot be retrieved, and a cache table exists, #get_web_data will use the cached value for this data even if the cache has already expired. To disallow this, add the following to LocalSettings.php:. This setting is also overrideable.

Parser function parameters
The following parameters can be added to #get_web_data, #get_soap_data or #get_program_data, to further configure caching for a specific call:


 * cache seconds - an optional parameter that sets the number of seconds that the values from this call should be cached; if it is less than, if there is any, the latter will apply; and if the effective cache expiration time is zero, caching is forbidden.
 * use stale cache - an optional parameter that allows this function to use an expired cache entry if it cannot retrieve the real data. Usage of the stale cache can be forced by.