Save SELECT * FROM auth_assignment WHERE user_id='...'
results in User
component property to avoid duplicate DB queries on one page.
See comment here.
Any thoughts?
I ran into the same issue as well.
:+1:
I also think this is a major performance issue in some scenarios.
I'm maybe off topic here (sorry), but here is a very simple workaround :
class DbManagerEx extends DbManager
{
private $_assignments = [];
public function getAssignments($userId)
{
// Avoid multiple queries per request
if(!isset($this->_assignments[$userId]))
$this->_assignments[$userId] = parent::getAssignments($userId);
return $this->_assignments[$userId];
}
}
@samdark did this ever get done?
as I am getting hundreds of
SELECT
b.* FROM
auth_assignmenta
,
auth_itemb
WHERE ((
a.
item_name=
b.
name) AND (
a.
user_id='91')) AND (
b.
type=1)
On some pages 馃憥
Not yet. Scheduled for next release though.
@samdark ahh ok, any tips how the above problem could be solved in the meantime?
Try using file storage instead.
Most helpful comment
:+1:
I also think this is a major performance issue in some scenarios.
I'm maybe off topic here (sorry), but here is a very simple workaround :