[ticket/494] Cache more queries on portal page

B3P-494
This commit is contained in:
Marc Alexander
2015-03-03 15:25:22 +01:00
parent a699a92e31
commit 1e405e9d91
13 changed files with 55 additions and 62 deletions

View File

@@ -49,10 +49,10 @@ class latest_bots extends module_base
/** @var \phpbb\config\config */
protected $config;
/** @var \phpbb\db\driver */
/** @var \phpbb\db\driver\driver_interface */
protected $db;
/** @var \phpbb\template */
/** @var \phpbb\template\template */
protected $template;
/** @var \phpbb\user */
@@ -62,8 +62,8 @@ class latest_bots extends module_base
* Construct a latest bots object
*
* @param \phpbb\config\config $config phpBB config
* @param \phpbb\db\driver $db phpBB db driver
* @param \phpbb\template $template phpBB template
* @param \phpbb\db\driver\driver_interface $db phpBB db driver
* @param \phpbb\template\template $template phpBB template
* @param \phpbb\user $user phpBB user object
*/
public function __construct($config, $db, $template, $user)
@@ -85,7 +85,7 @@ class latest_bots extends module_base
WHERE user_type = ' . USER_IGNORE . '
AND user_lastvisit > 0
ORDER BY user_lastvisit DESC';
$result = $this->db->sql_query_limit($sql, $this->config['board3_last_visited_bots_number_' . $module_id]);
$result = $this->db->sql_query_limit($sql, $this->config['board3_last_visited_bots_number_' . $module_id], 0, 600);
$show_module = false;