Zizaco / entrust

Role-based Permissions for Laravel 5
MIT License
6.05k stars 1.29k forks source link

cache should be forget after attach and detach operations. #943

Open knvpk opened 5 years ago

knvpk commented 5 years ago

The cache for particular role or permissions which is used in can and hasRole, should be removed when operations like attach and detach is happen. because the new changes need to be cached.

For now im doing this manually on my controllers but it should be in the plugin itself.

kossa commented 5 years ago

Seems like the repo is died, how to active cache ? I have a lot of request using auth()->user()->hasRole('admin')