Skip to content

Commit

Permalink
[ticket/666] Reduce caching time of post related queries
Browse files Browse the repository at this point in the history
B3P-666
  • Loading branch information
marc1706 committed Dec 10, 2015
1 parent a152da8 commit 278765e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions modules/recent.php
Expand Up @@ -136,7 +136,7 @@ public function get_template_center($module_id)
AND topic_moved_id = 0
' . $sql_where . $forum_sql . '
ORDER BY topic_time DESC';
$result = $this->db->sql_query_limit($sql, $this->config['board3_max_topics_' . $module_id], 0 , 600);
$result = $this->db->sql_query_limit($sql, $this->config['board3_max_topics_' . $module_id], 0 , 30);

while (($row = $this->db->sql_fetchrow($result)) && ($row['topic_title']))
{
Expand All @@ -162,7 +162,7 @@ public function get_template_center($module_id)
AND topic_moved_id = 0
' . $sql_where . $forum_sql . '
ORDER BY topic_time DESC';
$result = $this->db->sql_query_limit($sql, $this->config['board3_max_topics_' . $module_id], 0, 600);
$result = $this->db->sql_query_limit($sql, $this->config['board3_max_topics_' . $module_id], 0, 30);

while (($row = $this->db->sql_fetchrow($result)) && ($row['topic_title']))
{
Expand All @@ -189,7 +189,7 @@ public function get_template_center($module_id)
AND topic_moved_id = 0
' . $sql_where . $forum_sql . '
ORDER BY topic_time DESC';
$result = $this->db->sql_query_limit($sql, $this->config['board3_max_topics_' . $module_id], 0, 600);
$result = $this->db->sql_query_limit($sql, $this->config['board3_max_topics_' . $module_id], 0, 30);

while (($row = $this->db->sql_fetchrow($result)) && ($row['topic_title']))
{
Expand Down
2 changes: 1 addition & 1 deletion portal/fetch_posts.php
Expand Up @@ -266,7 +266,7 @@ protected function run_sql_query($post_time, $number_of_posts, $start)
// Cache queries for 30 seconds
if ($number_of_posts != 0)
{
$result = $this->db->sql_query_limit($sql, $number_of_posts, $start, 600);
$result = $this->db->sql_query_limit($sql, $number_of_posts, $start, 30);
}
else
{
Expand Down

0 comments on commit 278765e

Please sign in to comment.