Skip to content
Carl edited this page Sep 17, 2013 · 2 revisions

The programmes plant makes use of a number of internal caches in order to ensure requests to the API's as well general page loads can be displayed as quickly as possible.

Diagram of caches used in the Programmes Plant

Level 1: Base caches

All SimpleData datastores have 2 caches each, one containing a copy of their current data and the rest a pre-generated list used for populating drop-downs.

All Revisionable items then create caches for the published instance of each programme by instance ID and year.

Programmes in addition to the revisonble cache also mains an attributes cache as well as an index & relations mapping index file.

All the above caches are generated on save, to ensure they are always warn in normal operation of the programmes plant. Missing caches will be regenerated on demand.

Level 2: Output cache

The Output cache is used to store finalised results that can be used directly as a response to API calls. These caches are generated based on data found in the level one caches & are created on demand.

Other caches

The modules cache is generated by a task, which calls a number of API's external to the programmes plant itself. Previews are generated in the same way as the level 2 caches, expect they are built from live data rather than directly from the level 1 caches.

Postgraduate Deliveries

The PG deliveries utilise a two stage cache. Each time a delivery is updated it is stored in a cache file named with the year and Instance ID of the course it belongs to. Each cache file may contain multiple deliveries (as many as there are for a given programme).

When an output cache is generated for a PG programme API::combine_programme(), the API will attempt to find a cache for that programmes instance ID & year in the deliveries cache folder ( pg-deliveries/x-xxxx ), if the cache is found the deliveries will be added to that programmes output. (in addition to populating the award name data & appending relevant module data)

Clone this wiki locally