node-casbin icon indicating copy to clipboard operation
node-casbin copied to clipboard

Does node-casbin support StartAutoLoadPolicy

Open tamsler opened this issue 2 years ago • 4 comments

I am using node-casbin in AWS Lambda functions in conjunction with casbin-dynamodb-adapter. Instead of loading the policy on each lambda call, I was wondering node-casbin supports "StartAutoLoadPolicy", where the policy in each lambda instance would be updated on any "saved" policy change.

tamsler avatar Jul 07 '22 17:07 tamsler

@Gabriel-403 @Zxilly @kingiw @nodece

casbin-bot avatar Jul 07 '22 17:07 casbin-bot

@Shivansh-yadav13

/cc @nodece @Zxilly

hsluoyz avatar Jul 08 '22 01:07 hsluoyz

Maybe you should use watcher mechanic. It will update the in-memory policy when the policy in database updated.

Zxilly avatar Jul 08 '22 02:07 Zxilly

@nodece and I were planning to implement WatcherEX

Shivansh-yadav13 avatar Jul 08 '22 13:07 Shivansh-yadav13

WatcherEx has already be implemented: https://github.com/casbin/node-casbin/search?q=WatcherEX&type=

Closed here

hsluoyz avatar Jan 31 '23 14:01 hsluoyz