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:
parent
f8f0e1e5da
commit
30d73d2694
1 changed files with 2 additions and 2 deletions
|
|
@ -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());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue