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:
Niels 2022-06-19 13:50:08 +02:00 committed by GitHub
parent 8c08bc3fac
commit 54b935d748
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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`.