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

Centralize permission caching #2832

Merged
merged 2 commits into from
May 4, 2021
Merged

Conversation

askvortsov1
Copy link
Sponsor Member

Currently, we cache the user's list of permissions through hasPermission and hasPermissionLike. This is unnecessary duplication when we could just cache it in getPermissions directly. Furthermore, caching through getPermissions speeds up getPermission, for obvious reasons.

This came up in flarum/tags#126 (comment)

@askvortsov1 askvortsov1 merged commit 7d4bd8a into master May 4, 2021
@askvortsov1 askvortsov1 deleted the as/centralize_permission_caching branch May 4, 2021 17:56
@askvortsov1 askvortsov1 added this to the 1.0 milestone May 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants