Skip to content

Implement caching for ACL permission lookups and role hierarchy - #1326

Merged
RUKAYAT-CODER merged 1 commit into
rinafcode:mainfrom
VeronicDev:feature/cache-acl-permission-lookups
Sep 2, 2026
Merged

Implement caching for ACL permission lookups and role hierarchy#1326
RUKAYAT-CODER merged 1 commit into
rinafcode:mainfrom
VeronicDev:feature/cache-acl-permission-lookups

Conversation

@VeronicDev

@VeronicDev VeronicDev commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Changes

  • Add permission cache for function to memoize role-permission lookups
  • Add role hierarchy cache for function to memoize role comparison results
  • Add function for testing/reset purposes
  • Add comprehensive unit tests for caching behavior

Files Modified

    • Added caching mechanisms for permission and role hierarchy lookups
    • New test file with 24 tests covering all ACL functions

Testing

All 24 ACL tests pass. Existing tests continue to pass. TypeScript compilation and linting pass without errors.

closes #1154

- Add permission cache for hasPermission function
- Add role hierarchy cache for isAtLeastRole function
- Add clearAclCaches function for testing/reset purposes
- Add comprehensive unit tests for caching behavior

Closes rinafcode#1154
@drips-wave

drips-wave Bot commented Sep 2, 2026

Copy link
Copy Markdown

@VeronicDev Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@RUKAYAT-CODER

Copy link
Copy Markdown
Contributor

Thank you for contributing to the project.

@RUKAYAT-CODER
RUKAYAT-CODER merged commit a08269d into rinafcode:main Sep 2, 2026
6 of 7 checks passed
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.

Cache ACL permission lookups to cut repeated evaluation cost

2 participants