Add SQL query caching.
To use it: "$query = new query(true));"
Default cache validity is 20minutes, configure it in configure.php.
For special cache durations, add the time as a parameter :
$query = new query(true, $cacheExpireTime));