From a991cb13590b09889fd1667cbc837c117f5ecbaa Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Tue, 4 Aug 2015 14:48:31 +0200 Subject: [PATCH 1/2] [ticket/644] Reduce caching time on portal page B3P-644 --- modules/announcements.php | 2 +- modules/birthday_list.php | 2 +- modules/news.php | 2 +- portal/fetch_posts.php | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/announcements.php b/modules/announcements.php index a98fb3093..5d3a10a8f 100644 --- a/modules/announcements.php +++ b/modules/announcements.php @@ -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); } diff --git a/modules/birthday_list.php b/modules/birthday_list.php index 9fb839f39..7e19ae5a3 100644 --- a/modules/birthday_list.php +++ b/modules/birthday_list.php @@ -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)) diff --git a/modules/news.php b/modules/news.php index de37e3df7..5fbf9de73 100644 --- a/modules/news.php +++ b/modules/news.php @@ -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); } diff --git a/portal/fetch_posts.php b/portal/fetch_posts.php index 8931fe3b9..d99e30463 100644 --- a/portal/fetch_posts.php +++ b/portal/fetch_posts.php @@ -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; From 71e51ee730e65188f827d956d29acf8d084fe690 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Tue, 4 Aug 2015 14:49:22 +0200 Subject: [PATCH 2/2] [ticket/644] Update release date in composer.json B3P-644 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index fbb5af8e8..b7ed11691 100644 --- a/composer.json +++ b/composer.json @@ -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",