Laravel-permission: hasPermissionTo cache issue with latest update

Created on 13 Mar 2017  路  1Comment  路  Source: spatie/laravel-permission

Hey guys!

I just upgraded the package to the most recent that was pushed a day ago that included the caching capabilities with the Permission model. Is there a way to turn this off? It's causing issue when I do a permission update. I have to run a php artisan cache:clear every time I change a role's permission.

Thanks!

P.S. This package has saved me. Thanks! :D

Most helpful comment

You can run

app(\Spatie\PermissionPermissionRegistrar::class)->forgetCachedPermissions();

to forget all cached permissions.

>All comments

You can run

app(\Spatie\PermissionPermissionRegistrar::class)->forgetCachedPermissions();

to forget all cached permissions.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MichalKrakow picture MichalKrakow  路  4Comments

hosseinnedaei picture hosseinnedaei  路  3Comments

dylangeorgeharbour picture dylangeorgeharbour  路  3Comments

notflip picture notflip  路  3Comments

devingray picture devingray  路  3Comments