I am using Yii2 and using the yii\rbac\DbManager
for auth assignment.
I was looking at the logs to see where all the database calls are coming from and this query
SELECT `b`.* FROM `auth_assignment` `a`, `auth_item` `b` WHERE
((`a`.`item_name`=`b`.`name`) AND (`a`.`user_id`='91')) AND (`b`.`type`=1)
Keeps running again and again, sometimes 10/15 times in succession.
I have added
'authManager' => [
'class' => 'yii\rbac\DbManager',
'cache' => 'cache'
],
As the docs say that will cache the auth assignments (I am using Memcached). But it doesnt seem to work...
Anyone have any idea? Either how to cache it or why it keeps getting called so many times?
Cheers