Each tenant uses a separate database, while the laravel-settings cache shares a single Redis instance
Or
Tenants share a common database, differentiated by team_id, such as the filamentphp framework (I have already implemented tenant settings through a custom repository)
However, I am currently facing an issue where the laravel-settings cache key remains the same across multiple tenants, rendering the cache indistinguishable between them
I found some older issues, but I haven't found a solution to this problem. Is there a solution to this problem now? Thank you very much for your answer
#39
#139
If this issue remains unresolved, I will attempt to submit a pull request (PR):
There will be a problem with this method: because tenants are typically handled in the middleware, if a setting class is used in the boot method of serviceProvider, the correct tenant cannot be obtained
- Add a static method
resolveCacheKey to the invoked settings object, and then use this method to change the cache key