-
Notifications
You must be signed in to change notification settings - Fork 633
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Apply the cache strategy for all policy lookups
This should be backwards-compatible because: * `Pundit.policy` and `Pundit.policy!` are unaffected by this, since they use a non-cache cache. * `Pundit::Context` is new, so nobody is relying on these methods yet. * `Pundit::Authorization#policy` already cached the policy anyway. * `policies` is explicitly discouraged, but even if it is relied upon it works as it always has, by default. This is an improvement because we can change the cache strategy to introduce new features without breaking backwards-compatibility.
- Loading branch information
1 parent
43b1d87
commit 399fe6e
Showing
2 changed files
with
18 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters