1
0
Fork 0
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:
Julian Hundeloh 2024-11-25 20:50:01 +01:00 committed by GitHub
parent e7cce6ab43
commit 46c694975f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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