mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 08:44:04 +00:00
fix: return Tenant from writeCache
This commit is contained in:
parent
e7cce6ab43
commit
46c694975f
1 changed files with 4 additions and 4 deletions
|
|
@ -40,17 +40,17 @@ abstract class CachedTenantResolver implements TenantResolver
|
|||
return $tenant;
|
||||
}
|
||||
|
||||
$this->writeCache(...$args);
|
||||
|
||||
return $tenant;
|
||||
return $this->writeCache(...$args);
|
||||
}
|
||||
|
||||
public function writeCache(...$args): void
|
||||
public function writeCache(...$args): Tenant
|
||||
{
|
||||
$key = $this->getCacheKey(...$args);
|
||||
$tenant = $this->resolveWithoutCache(...$args);
|
||||
|
||||
$this->cache->put($key, $tenant, static::$cacheTTL);
|
||||
|
||||
return $tenant;
|
||||
}
|
||||
|
||||
public function invalidateCache(Tenant $tenant): void
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue