mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-29 02:59:52 +02:00
[ticket/13713] Rework names caching
PHPBB3-13713
This commit is contained in:
@@ -36,6 +36,9 @@ abstract class base_group implements source_interface
|
||||
/** @var string */
|
||||
protected $php_ext;
|
||||
|
||||
/** @var string|false */
|
||||
protected $cache_ttl = false;
|
||||
|
||||
/** @var array Fetched groups' data */
|
||||
protected $groups = null;
|
||||
|
||||
@@ -125,8 +128,8 @@ abstract class base_group implements source_interface
|
||||
*/
|
||||
public function get(array &$names, $keyword, $topic_id)
|
||||
{
|
||||
// Grab all group IDs, cache for 5 minutes
|
||||
$result = $this->db->sql_query($this->query($keyword, $topic_id), 300);
|
||||
// Grab all group IDs and cache them if needed
|
||||
$result = $this->db->sql_query($this->query($keyword, $topic_id), $this->cache_ttl);
|
||||
|
||||
$group_ids = [];
|
||||
while ($row = $this->db->sql_fetchrow($result))
|
||||
|
Reference in New Issue
Block a user