Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] inconsisitent cache when updating policy & adding a deny rule #1065

Closed
JalinWang opened this issue Jul 29, 2022 · 7 comments
Closed

[Bug] inconsisitent cache when updating policy & adding a deny rule #1065

JalinWang opened this issue Jul 29, 2022 · 7 comments
Assignees

Comments

@JalinWang
Copy link
Member

CachedEnforcer can not handle the update requests, i.e., it does not invalidate the cache.

Also, if AddPolicy() add a user deny rule, e.g., alice, data, read, deny, or role deny rule, e.g., admin, data, read, deny, the cache is also buggy. Do we need to consider such case?

Screenshot about the lack of cached version update in CachedEnforcer:
image

image

@casbin-bot
Copy link
Member

@tangyang9464 @JalinWang

@hsluoyz
Copy link
Member

hsluoyz commented Jul 29, 2022

@tangyang9464

@tangyang9464
Copy link
Member

@JalinWang CachedEnforcer lacks maintenance and seems to be used by very few people. You can try to improve its api with low priority

@hsluoyz
Copy link
Member

hsluoyz commented Aug 11, 2022

can't agree more with @tangyang9464

@michaelknowles
Copy link

If there are no complaints and no work already in progress here, I'd like to work on a PR for this. We just switched to the CachedEnforcer to reduce allocations from regex and are running into these edge cases now.

@hsluoyz
Copy link
Member

hsluoyz commented Oct 6, 2022

@michaelknowles the contribution is welcome!

@hsluoyz hsluoyz closed this as completed Nov 21, 2022
@hsluoyz
Copy link
Member

hsluoyz commented Nov 21, 2022

Closed as stale

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants