laravel-auth
laravel-auth copied to clipboard
Permission Cache issue
Did you star the repo? Yes
Describe the bug Similar to Laravel Spatie, is there a PermissionRegistrar that cache permissions or roles to save DB queries. https://github.com/spatie/laravel-permission/blob/main/src/PermissionRegistrar.php
The reason, I am asking this as I am using [stancl/tenancny package ] (https://github.com/archtechx/tenancy). And there seems to be a bug when adding roles in tenant environment it updates roles in central database. This is primilary due to caching issue. Similar issue was reported and resolved with Spatie permission. Please see https://github.com/archtechx/tenancy/issues/230
However while searching for Cache setting for Laravel-Roles package, I am unable to find such setting.
To Reproduce Steps to reproduce the behavior:
Install Laravel Auth https://github.com/jeremykenedy/laravel-auth (This contains Laravel Roles package too) Install Stancl Tenancy package https://github.com/archtechx/tenancy with multi database setup Create New Role in Tenant e.g. Admin New role will also be replicated now in Central DB without using Syncable
All other items do not replicate/sync including creation of users etc. Only Roles replicate possibly due to caching feature somewhere.
Expected behavior Cache should be disabled
Additional context I have opened similar issue in https://github.com/archtechx/tenancy/issues/753 so that cross collaboration to resolve this issue can happen. Thank you once again for your support.
Did you try clearing the auto loader with
composer dump-autoload
On Nov 16, 2021, at 12:37 AM, livinglegend13 @.***> wrote:
Did you star the repo? Yes
Describe the bug Similar to Laravel Spatie, is there a PermissionRegistrar that cache permissions or roles to save DB queries. https://github.com/spatie/laravel-permission/blob/main/src/PermissionRegistrar.php
The reason, I am asking this as I am using [stancl/tenancny package ] (https://github.com/archtechx/tenancy). And there seems to be a bug when adding roles in tenant environment it updates roles in central database. This is primilary due to caching issue. Similar issue was reported and resolved with Spatie permission. Please see archtechx/tenancy#230
However while searching for Cache setting for Laravel-Roles package, I am unable to find such setting.
To Reproduce Steps to reproduce the behavior:
Install Laravel Auth https://github.com/jeremykenedy/laravel-auth (This contains Laravel Roles package too) Install Stancl Tenancy package https://github.com/archtechx/tenancy with multi database setup Create New Role in Tenant e.g. Admin New role will also be replicated now in Central DB without using Syncable
All other items do not replicate/sync including creation of users etc. Only Roles replicate possibly due to caching feature somewhere.
Expected behavior Cache should be disabled
Additional context I have opened similar issue in archtechx/tenancy#753 so that cross collaboration to resolve this issue can happen. Thank you once again for your support.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.
Just tried that and it does not work. Thanks for guiding Jeremy.
It's not caching the queries that I am aware of