Merge pull request #647 from marc1706/ticket/644

[ticket/644] Reduce caching time on portal page
This commit is contained in:
Marc Alexander
2015-08-04 15:05:56 +02:00
5 changed files with 6 additions and 6 deletions

View File

@@ -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.", "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", "homepage": "http://www.board3.de",
"version": "2.1.0", "version": "2.1.0",
"time": "2015-06-20 13:27:52", "time": "2015-08-04 12:49:14",
"license": "GPL-2.0", "license": "GPL-2.0",
"authors": [{ "authors": [{
"name": "Marc Alexander", "name": "Marc Alexander",

View File

@@ -225,7 +225,7 @@ class announcements extends module_base
AND topic_moved_id = 0 AND topic_moved_id = 0
' . $post_time . ' ' . $post_time . '
' . $str_where; ' . $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'); $total_announcements = (int) $this->db->sql_fetchfield('num_topics');
$this->db->sql_freeresult($result); $this->db->sql_freeresult($result);
} }

View File

@@ -119,7 +119,7 @@ class birthday_list extends module_base
'ORDER BY' => $order_by, 'ORDER BY' => $order_by,
); );
$sql = $this->db->sql_build_query('SELECT', $sql_array); $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']); $today = sprintf('%2d-%2d-', $now['mday'], $now['mon']);
while ($row = $this->db->sql_fetchrow($result)) while ($row = $this->db->sql_fetchrow($result))

View File

@@ -218,7 +218,7 @@ class news extends module_base
AND topic_visibility = ' . ITEM_APPROVED . ' AND topic_visibility = ' . ITEM_APPROVED . '
AND topic_moved_id = 0 AND topic_moved_id = 0
' . $str_where; ' . $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'); $total_news = (int) $this->db->sql_fetchfield('num_topics');
$this->db->sql_freeresult($result); $this->db->sql_freeresult($result);
} }

View File

@@ -263,14 +263,14 @@ class fetch_posts
$sql_array['SELECT'] .= ', tp.topic_posted'; $sql_array['SELECT'] .= ', tp.topic_posted';
$sql = $this->db->sql_build_query('SELECT', $sql_array); $sql = $this->db->sql_build_query('SELECT', $sql_array);
// Cache queries for 10 minutes // Cache queries for 30 seconds
if ($number_of_posts != 0) 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, 600);
} }
else else
{ {
$result = $this->db->sql_query($sql, 600); $result = $this->db->sql_query($sql, 30);
} }
return $result; return $result;