Skip to content

Commit

Permalink
Merge pull request #647 from marc1706/ticket/644
Browse files Browse the repository at this point in the history
[ticket/644] Reduce caching time on portal page
  • Loading branch information
marc1706 committed Aug 4, 2015
2 parents f3dd0c3 + 71e51ee commit 6971392
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion composer.json
Expand Up @@ -4,7 +4,7 @@
"description": "Adds a portal with several blocks to your forum. You can change the settings, move the blocks, add new blocks and more in the ACP.",
"homepage": "http://www.board3.de",
"version": "2.1.0",
"time": "2015-06-20 13:27:52",
"time": "2015-08-04 12:49:14",
"license": "GPL-2.0",
"authors": [{
"name": "Marc Alexander",
Expand Down
2 changes: 1 addition & 1 deletion modules/announcements.php
Expand Up @@ -225,7 +225,7 @@ public function get_template_center($module_id)
AND topic_moved_id = 0
' . $post_time . '
' . $str_where;
$result = $this->db->sql_query($sql, 300);
$result = $this->db->sql_query($sql, 30);
$total_announcements = (int) $this->db->sql_fetchfield('num_topics');
$this->db->sql_freeresult($result);
}
Expand Down
2 changes: 1 addition & 1 deletion modules/birthday_list.php
Expand Up @@ -119,7 +119,7 @@ public function get_template_side($module_id)
'ORDER BY' => $order_by,
);
$sql = $this->db->sql_build_query('SELECT', $sql_array);
$result = $this->db->sql_query($sql, 3600);
$result = $this->db->sql_query($sql, 300);
$today = sprintf('%2d-%2d-', $now['mday'], $now['mon']);

while ($row = $this->db->sql_fetchrow($result))
Expand Down
2 changes: 1 addition & 1 deletion modules/news.php
Expand Up @@ -218,7 +218,7 @@ public function get_template_center($module_id)
AND topic_visibility = ' . ITEM_APPROVED . '
AND topic_moved_id = 0
' . $str_where;
$result = $this->db->sql_query($sql, 300);
$result = $this->db->sql_query($sql, 30);
$total_news = (int) $this->db->sql_fetchfield('num_topics');
$this->db->sql_freeresult($result);
}
Expand Down
4 changes: 2 additions & 2 deletions portal/fetch_posts.php
Expand Up @@ -263,14 +263,14 @@ protected function run_sql_query($post_time, $number_of_posts, $start)
$sql_array['SELECT'] .= ', tp.topic_posted';
$sql = $this->db->sql_build_query('SELECT', $sql_array);

// Cache queries for 10 minutes
// Cache queries for 30 seconds
if ($number_of_posts != 0)
{
$result = $this->db->sql_query_limit($sql, $number_of_posts, $start, 600);
}
else
{
$result = $this->db->sql_query($sql, 600);
$result = $this->db->sql_query($sql, 30);
}

return $result;
Expand Down

0 comments on commit 6971392

Please sign in to comment.