Skip to content

Enabling caching of results

alangrafu edited this page Nov 24, 2012 · 5 revisions

LODSPeaKr supports a (for now) simple caching system. Instead of requesting data from the SPARQL endpoint everytime someone requests a URI, LODSPeaKr can be set so it will retrieve the data and store it for a certain period of time. During that time, LODSPeaKr will serve those results directly instead of executing a new SPARQL query. After that period of time expires, the next time a URI is requested, LODSPeaKr will actually run the necessary SPARQL queries against the endpoints and saving again the results in the cache directory.

Why?

In terms of efficiency, your mileage may vary, but running tests against dbpedia and dydra, I have found a (not surprising) decrease of at least one order of magnitud in the time to serve a page.

How?

For now, just add

$conf['cache']['global'] = 600;

to your settings.inc.php. (Beware that using utils/lodspk.sh add variable won't work for now). The number defines the minimum amount of time (in seconds) that the results will be stored.

Clone this wiki locally