Skip to content

Add support for custom user model cache keys#705

Open
mo-soukar wants to merge 4 commits intosantigarcor:masterfrom
mo-soukar:custom-user-cache-key
Open

Add support for custom user model cache keys#705
mo-soukar wants to merge 4 commits intosantigarcor:masterfrom
mo-soukar:custom-user-cache-key

Conversation

@mo-soukar
Copy link

This PR allows the user model to define a custom cache key by implementing the laratrustCacheKey() method. This provides more flexibility than relying solely on the configuration file.

Why is this necessary?
This is particularly useful for Multi-tenant systems. In such environments, the same user model might need a dynamic cache key that includes the tenant_id to prevent cache collisions between different tenants.

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.

1 participant