A new interface, `FilteredAdapter`, extends the `Adapter` interface
with the ability to load a filtered subset of the backend policy.
This allows Casbin to more effectively scale when enforcing a very
large number of policies, such as a busy multi-tenant system. There
is also a second built-in file adapter supporting this feature.
To prevent accidental data loss, the `SavePolicy` method is disabled
when a filtered policy is loaded. For maximum compatibility, whether
a given `Adapter` implements the new feature is checked at runtime.
A new interface,
FilteredAdapter, extends theAdapterinterfacewith the ability to load a filtered subset of the back-end policy.
This allows Casbin to more effectively scale when enforcing a very
large number of policies, such as a busy multi-tenant system. There
is also a second built-in file adapter supporting this feature.
To prevent accidental data loss, the
SavePolicymethod is disabledwhen a filtered policy is loaded. For maximum compatibility, whether
a given
Adapterimplements the new feature is checked at runtime.