Merge pull request #667 from marc1706/ticket/666
[ticket/666] Reduce caching time of post related queries
This commit is contained in:
@@ -136,7 +136,7 @@ class recent extends module_base
|
||||
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']))
|
||||
{
|
||||
@@ -162,7 +162,7 @@ class recent extends module_base
|
||||
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']))
|
||||
{
|
||||
@@ -189,7 +189,7 @@ class recent extends module_base
|
||||
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']))
|
||||
{
|
||||
|
||||
@@ -266,7 +266,7 @@ class fetch_posts
|
||||
// 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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user