mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 12:04:03 +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;
|
return $tenant;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->writeCache(...$args);
|
return $this->writeCache(...$args);
|
||||||
|
|
||||||
return $tenant;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function writeCache(...$args): void
|
public function writeCache(...$args): Tenant
|
||||||
{
|
{
|
||||||
$key = $this->getCacheKey(...$args);
|
$key = $this->getCacheKey(...$args);
|
||||||
$tenant = $this->resolveWithoutCache(...$args);
|
$tenant = $this->resolveWithoutCache(...$args);
|
||||||
|
|
||||||
$this->cache->put($key, $tenant, static::$cacheTTL);
|
$this->cache->put($key, $tenant, static::$cacheTTL);
|
||||||
|
|
||||||
|
return $tenant;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function invalidateCache(Tenant $tenant): void
|
public function invalidateCache(Tenant $tenant): void
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue