[ticket/666] Reduce caching time of post related queries
B3P-666
This commit is contained in:
@@ -136,7 +136,7 @@ class recent extends module_base
|
|||||||
AND topic_moved_id = 0
|
AND topic_moved_id = 0
|
||||||
' . $sql_where . $forum_sql . '
|
' . $sql_where . $forum_sql . '
|
||||||
ORDER BY topic_time DESC';
|
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']))
|
while (($row = $this->db->sql_fetchrow($result)) && ($row['topic_title']))
|
||||||
{
|
{
|
||||||
@@ -162,7 +162,7 @@ class recent extends module_base
|
|||||||
AND topic_moved_id = 0
|
AND topic_moved_id = 0
|
||||||
' . $sql_where . $forum_sql . '
|
' . $sql_where . $forum_sql . '
|
||||||
ORDER BY topic_time DESC';
|
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']))
|
while (($row = $this->db->sql_fetchrow($result)) && ($row['topic_title']))
|
||||||
{
|
{
|
||||||
@@ -189,7 +189,7 @@ class recent extends module_base
|
|||||||
AND topic_moved_id = 0
|
AND topic_moved_id = 0
|
||||||
' . $sql_where . $forum_sql . '
|
' . $sql_where . $forum_sql . '
|
||||||
ORDER BY topic_time DESC';
|
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']))
|
while (($row = $this->db->sql_fetchrow($result)) && ($row['topic_title']))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -266,7 +266,7 @@ class fetch_posts
|
|||||||
// Cache queries for 30 seconds
|
// 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, 30);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user