mirror of
https://github.com/stancl/tenancy-docs.git
synced 2025-12-12 18:24:03 +00:00
Add info on automatic cache invalidation
I spent some time to find out how to manually invalidate the cache, when during testing I found out this is already handled in the base Tenant model. Adding this small paragraph might help others.
This commit is contained in:
parent
8c08bc3fac
commit
54b935d748
1 changed files with 5 additions and 1 deletions
|
|
@ -31,3 +31,7 @@ DomainTenantResolver::$cacheTTL = 3600;
|
||||||
// null resolves to the default cache store
|
// null resolves to the default cache store
|
||||||
DomainTenantResolver::$cacheStore = 'redis';
|
DomainTenantResolver::$cacheStore = 'redis';
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Cache invalidation
|
||||||
|
|
||||||
|
Updating and saving a Tenant model's attributes will cause the cached entry for this model to be invalidated when `DomainTenantResolver::$shouldCache` is set to `true`.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue