1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-12 20:54:04 +00:00

Change nonTenantCacheDrivers to tenantCacheStores

This commit is contained in:
lukinovec 2023-01-05 16:13:00 +01:00
parent f8f0e1e5da
commit 30d73d2694

View file

@ -14,7 +14,7 @@ class PrefixCacheTenancyBootstrapper implements TenancyBootstrapper
{ {
protected string|null $originalPrefix = null; protected string|null $originalPrefix = null;
protected string $storeName; protected string $storeName;
public static array $nonTenantCacheDrivers = []; public static array $tenantCacheStores = [];
public function __construct( public function __construct(
protected Repository $config, protected Repository $config,
@ -27,7 +27,7 @@ class PrefixCacheTenancyBootstrapper implements TenancyBootstrapper
$this->originalPrefix = $this->config->get('cache.prefix'); $this->originalPrefix = $this->config->get('cache.prefix');
$this->storeName = $this->config->get('cache.default'); $this->storeName = $this->config->get('cache.default');
if (! in_array($this->storeName, static::$nonTenantCacheDrivers)) { if (in_array($this->storeName, static::$tenantCacheStores)) {
$this->setCachePrefix($this->originalPrefix . $this->config->get('tenancy.cache.prefix_base') . $tenant->getTenantKey()); $this->setCachePrefix($this->originalPrefix . $this->config->get('tenancy.cache.prefix_base') . $tenant->getTenantKey());
} }
} }