You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+12Lines changed: 12 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -74,6 +74,18 @@ extends `Illuminate\Foundation\Auth\User`. Overriding that would break functiona
74
74
Not only that, but it probably isn't a good idea to cache the user model anyway,
75
75
since you always want to pull the most up-to-date info on it.
76
76
77
+
### Multitenant support for cached models
78
+
If you need multitenancy support the same model context (key and tags) needs to be cached for each denant with it's specific values. This requires a separations of cache that is supported by implementing the getCachePrefix method in the model class.
79
+
80
+
I would recommend to implement in your application a TenantCachable trait containing the getCachePrefix method that for example returns a unique value corresponding to each tenant.
81
+
An example in the context of using the hyn/multi-tenant package can be:
0 commit comments