-
Notifications
You must be signed in to change notification settings - Fork 15
Enabling caching of results
LODSPeaKr supports a (for now) simple caching system. Instead of requesting data from the SPARQL endpoint every time 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.
In terms of efficiency, your mileage may vary, but running tests against dbpedia and dydra, I have found a (not surprisingly) decrease of at least one order of magnitude in the time to serve a page.
For now, just add
$conf['cache']['global'] = 600; //Caching of results for 10 min. (60*10 seconds)
to your settings.inc.php
. (Beware that using utils/lodspk.sh add variable
won't work for now). The number defines the amount of time (in seconds) that the results will be stored.