Jon

Results 26 comments of Jon

@Tinywan It is recommended to add the cache configuration, refer to: [Laravel-authz](https://github.com/php-casbin/laravel-authz/blob/master/config/lauthz.php)

@Tinywan I think the use of caching configuration is more universal, and your caching strategy can be one of them.

多站点可以有不同配置文件,配置不同的key即可,甚至可以配置不同的缓存驱动使用不同的redis库.

Go版是没有的 :https://github.com/casbin/casbin/blob/aabe6ce12e01f726e1fdc8182aafcff3a3902697/rbac_api.go#L54 你可以提向主库PHP-Casbin提 issue或PR。

另外 `addPolicy`传的参数 和 定义的参数个数(r = sub, dom, obj, act) 不一致

@pengRW 缓存是自动更新,参考:https://www.kancloud.cn/manual/thinkphp6_0/1037553 目前没有配置开关。

@Cromwell98 Can you make a PR?

@km3945 See https://github.com/php-casbin/think-authz/network/dependents?package_id=UGFja2FnZS02NjQ3MDE5OTY%3D

缓存使用官方框架内置,参考THINKPHP文档:[数据库缓存](https://www.kancloud.cn/manual/thinkphp6_0/1037553),[杂项-缓存](https://www.kancloud.cn/manual/thinkphp6_0/1037634),可以在缓存配置中设置`expire`。

@RafGiammario Good idea, we will implement it asap. You can submit a PR if you can.