/** * Hotaru CMS Smart Caching * * This function does one query on the database to get the last updated time for a * specified table. If that time is more recent than the $timeout length (e.g. 10 minutes), * the database will be used. If there hasn't been an update, any cached results from the * last 10 minutes will be used. * * @param string $switch either "on", "off" or "html" * @param string $table DB table name * @param int $timeout time before DB cache expires * @param string $html_sql output as HTML, or an SQL query * @param string $label optional label to append to filename * @return bool */ public function smartCache($switch = 'off', $table = '', $timeout = 0, $html_sql = '', $label = '') { require_once LIBS . 'Caching.php'; $caching = new Caching(); return $caching->smartCache($this, $switch, $table, $timeout, $html_sql, $label); }