mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 17:44:04 +00:00
Add check to invalidateCache()
This commit is contained in:
parent
5d94727ddd
commit
ba7257670f
4 changed files with 89 additions and 45 deletions
|
|
@ -48,6 +48,10 @@ abstract class CachedTenantResolver implements TenantResolver
|
|||
|
||||
public function invalidateCache(Tenant $tenant): void
|
||||
{
|
||||
if (! static::$shouldCache) {
|
||||
return;
|
||||
}
|
||||
|
||||
foreach ($this->getArgsForTenant($tenant) as $args) {
|
||||
$this->cache->forget($this->getCacheKey(...$args));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue